ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Platform

Contents

- SSE and AVX
- Platform constants
- Shared libraries

Description

Platform description

Synopsis

- data Platform = Platform {
  - platformArchOS :: !ArchOS
  - platformWordSize :: !PlatformWordSize
  - platformByteOrder :: !ByteOrder
  - platformUnregisterised :: !Bool
  - platformHasGnuNonexecStack :: !Bool
  - platformHasIdentDirective :: !Bool
  - platformHasSubsectionsViaSymbols :: !Bool
  - platformIsCrossCompiling :: !Bool
  - platformLeadingUnderscore :: !Bool
  - platformTablesNextToCode :: !Bool
  - platformHasLibm :: !Bool
  - platform_constants :: !(Maybe PlatformConstants)
  }
- data PlatformWordSize
  - = PW4
  - | PW8
- platformArch :: Platform -> Arch
- platformOS :: Platform -> OS
- data ArchOS = ArchOS {
  - archOS_arch :: Arch
  - archOS_OS :: OS
  }
- data Arch
  - = ArchUnknown
  - | ArchX86
  - | ArchX86_64
  - | ArchPPC
  - | ArchPPC_64 PPC_64ABI
  - | ArchS390X
  - | ArchARM ArmISA [ArmISAExt] ArmABI
  - | ArchAArch64
  - | ArchAlpha
  - | ArchMipseb
  - | ArchMipsel
  - | ArchRISCV64
  - | ArchLoongArch64
  - | ArchJavaScript
  - | ArchWasm32
- data OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
  - | OSQNXNTO
  - | OSAIX
  - | OSHurd
  - | OSWasi
  - | OSGhcjs
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- data PPC_64ABI
  - = ELF_V1
  - | ELF_V2
- data ByteOrder
  - = BigEndian
  - | LittleEndian
- target32Bit :: Platform -> Bool
- isARM :: Arch -> Bool
- osElfTarget :: OS -> Bool
- osMachOTarget :: OS -> Bool
- osSubsectionsViaSymbols :: OS -> Bool
- platformUsesFrameworks :: Platform -> Bool
- platformWordSizeInBytes :: Platform -> Int
- platformWordSizeInBits :: Platform -> Int
- platformMinInt :: Platform -> Integer
- platformMaxInt :: Platform -> Integer
- platformMaxWord :: Platform -> Integer
- platformInIntRange :: Platform -> Integer -> Bool
- platformInWordRange :: Platform -> Integer -> Bool
- platformCConvNeedsExtension :: Platform -> Bool
- data PlatformMisc = PlatformMisc {
  - platformMisc_targetPlatformString :: String
  - platformMisc_ghcWithInterpreter :: Bool
  - platformMisc_libFFI :: Bool
  - platformMisc_llvmTarget :: String
  }
- data SseVersion
  - = SSE1
  - | SSE2
  - | SSE3
  - | SSE4
  - | SSE42
- data BmiVersion
  - = BMI1
  - | BMI2
- wordAlignment :: Platform -> Alignment
- isSseEnabled :: Platform -> Bool
- isSse2Enabled :: Platform -> Bool
- data PlatformConstants = PlatformConstants {
  - pc_CONTROL_GROUP_CONST_291 :: !Int
  - pc_STD_HDR_SIZE :: !Int
  - pc_PROF_HDR_SIZE :: !Int
  - pc_BLOCK_SIZE :: !Int
  - pc_BLOCKS_PER_MBLOCK :: !Int
  - pc_TICKY_BIN_COUNT :: !Int
  - pc_OFFSET_StgRegTable_rR1 :: !Int
  - pc_OFFSET_StgRegTable_rR2 :: !Int
  - pc_OFFSET_StgRegTable_rR3 :: !Int
  - pc_OFFSET_StgRegTable_rR4 :: !Int
  - pc_OFFSET_StgRegTable_rR5 :: !Int
  - pc_OFFSET_StgRegTable_rR6 :: !Int
  - pc_OFFSET_StgRegTable_rR7 :: !Int
  - pc_OFFSET_StgRegTable_rR8 :: !Int
  - pc_OFFSET_StgRegTable_rR9 :: !Int
  - pc_OFFSET_StgRegTable_rR10 :: !Int
  - pc_OFFSET_StgRegTable_rF1 :: !Int
  - pc_OFFSET_StgRegTable_rF2 :: !Int
  - pc_OFFSET_StgRegTable_rF3 :: !Int
  - pc_OFFSET_StgRegTable_rF4 :: !Int
  - pc_OFFSET_StgRegTable_rF5 :: !Int
  - pc_OFFSET_StgRegTable_rF6 :: !Int
  - pc_OFFSET_StgRegTable_rD1 :: !Int
  - pc_OFFSET_StgRegTable_rD2 :: !Int
  - pc_OFFSET_StgRegTable_rD3 :: !Int
  - pc_OFFSET_StgRegTable_rD4 :: !Int
  - pc_OFFSET_StgRegTable_rD5 :: !Int
  - pc_OFFSET_StgRegTable_rD6 :: !Int
  - pc_OFFSET_StgRegTable_rXMM1 :: !Int
  - pc_OFFSET_StgRegTable_rXMM2 :: !Int
  - pc_OFFSET_StgRegTable_rXMM3 :: !Int
  - pc_OFFSET_StgRegTable_rXMM4 :: !Int
  - pc_OFFSET_StgRegTable_rXMM5 :: !Int
  - pc_OFFSET_StgRegTable_rXMM6 :: !Int
  - pc_OFFSET_StgRegTable_rYMM1 :: !Int
  - pc_OFFSET_StgRegTable_rYMM2 :: !Int
  - pc_OFFSET_StgRegTable_rYMM3 :: !Int
  - pc_OFFSET_StgRegTable_rYMM4 :: !Int
  - pc_OFFSET_StgRegTable_rYMM5 :: !Int
  - pc_OFFSET_StgRegTable_rYMM6 :: !Int
  - pc_OFFSET_StgRegTable_rZMM1 :: !Int
  - pc_OFFSET_StgRegTable_rZMM2 :: !Int
  - pc_OFFSET_StgRegTable_rZMM3 :: !Int
  - pc_OFFSET_StgRegTable_rZMM4 :: !Int
  - pc_OFFSET_StgRegTable_rZMM5 :: !Int
  - pc_OFFSET_StgRegTable_rZMM6 :: !Int
  - pc_OFFSET_StgRegTable_rL1 :: !Int
  - pc_OFFSET_StgRegTable_rSp :: !Int
  - pc_OFFSET_StgRegTable_rSpLim :: !Int
  - pc_OFFSET_StgRegTable_rHp :: !Int
  - pc_OFFSET_StgRegTable_rHpLim :: !Int
  - pc_OFFSET_StgRegTable_rCCCS :: !Int
  - pc_OFFSET_StgRegTable_rCurrentTSO :: !Int
  - pc_OFFSET_StgRegTable_rCurrentNursery :: !Int
  - pc_OFFSET_StgRegTable_rHpAlloc :: !Int
  - pc_OFFSET_stgEagerBlackholeInfo :: !Int
  - pc_OFFSET_stgGCEnter1 :: !Int
  - pc_OFFSET_stgGCFun :: !Int
  - pc_OFFSET_Capability_r :: !Int
  - pc_OFFSET_bdescr_start :: !Int
  - pc_OFFSET_bdescr_free :: !Int
  - pc_OFFSET_bdescr_blocks :: !Int
  - pc_OFFSET_bdescr_flags :: !Int
  - pc_SIZEOF_CostCentreStack :: !Int
  - pc_OFFSET_CostCentreStack_mem_alloc :: !Int
  - pc_REP_CostCentreStack_mem_alloc :: !Int
  - pc_OFFSET_CostCentreStack_scc_count :: !Int
  - pc_REP_CostCentreStack_scc_count :: !Int
  - pc_OFFSET_StgHeader_ccs :: !Int
  - pc_OFFSET_StgHeader_ldvw :: !Int
  - pc_SIZEOF_StgSMPThunkHeader :: !Int
  - pc_OFFSET_StgEntCounter_allocs :: !Int
  - pc_REP_StgEntCounter_allocs :: !Int
  - pc_OFFSET_StgEntCounter_allocd :: !Int
  - pc_REP_StgEntCounter_allocd :: !Int
  - pc_OFFSET_StgEntCounter_registeredp :: !Int
  - pc_OFFSET_StgEntCounter_link :: !Int
  - pc_OFFSET_StgEntCounter_entry_count :: !Int
  - pc_SIZEOF_StgUpdateFrame_NoHdr :: !Int
  - pc_SIZEOF_StgMutArrPtrs_NoHdr :: !Int
  - pc_OFFSET_StgMutArrPtrs_ptrs :: !Int
  - pc_OFFSET_StgMutArrPtrs_size :: !Int
  - pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: !Int
  - pc_OFFSET_StgSmallMutArrPtrs_ptrs :: !Int
  - pc_SIZEOF_StgArrBytes_NoHdr :: !Int
  - pc_OFFSET_StgArrBytes_bytes :: !Int
  - pc_OFFSET_StgTSO_alloc_limit :: !Int
  - pc_OFFSET_StgTSO_cccs :: !Int
  - pc_OFFSET_StgTSO_stackobj :: !Int
  - pc_OFFSET_StgStack_sp :: !Int
  - pc_OFFSET_StgStack_stack :: !Int
  - pc_OFFSET_StgUpdateFrame_updatee :: !Int
  - pc_OFFSET_StgFunInfoExtraFwd_arity :: !Int
  - pc_REP_StgFunInfoExtraFwd_arity :: !Int
  - pc_SIZEOF_StgFunInfoExtraRev :: !Int
  - pc_OFFSET_StgFunInfoExtraRev_arity :: !Int
  - pc_REP_StgFunInfoExtraRev_arity :: !Int
  - pc_MAX_SPEC_SELECTEE_SIZE :: !Int
  - pc_MAX_SPEC_AP_SIZE :: !Int
  - pc_MIN_PAYLOAD_SIZE :: !Int
  - pc_MIN_INTLIKE :: !Int
  - pc_MAX_INTLIKE :: !Int
  - pc_MIN_CHARLIKE :: !Int
  - pc_MAX_CHARLIKE :: !Int
  - pc_MUT_ARR_PTRS_CARD_BITS :: !Int
  - pc_MAX_Vanilla_REG :: !Int
  - pc_MAX_Float_REG :: !Int
  - pc_MAX_Double_REG :: !Int
  - pc_MAX_Long_REG :: !Int
  - pc_MAX_XMM_REG :: !Int
  - pc_MAX_Real_Vanilla_REG :: !Int
  - pc_MAX_Real_Float_REG :: !Int
  - pc_MAX_Real_Double_REG :: !Int
  - pc_MAX_Real_XMM_REG :: !Int
  - pc_MAX_Real_Long_REG :: !Int
  - pc_RESERVED_C_STACK_BYTES :: !Int
  - pc_RESERVED_STACK_WORDS :: !Int
  - pc_AP_STACK_SPLIM :: !Int
  - pc_WORD_SIZE :: !Int
  - pc_CINT_SIZE :: !Int
  - pc_CLONG_SIZE :: !Int
  - pc_CLONG_LONG_SIZE :: !Int
  - pc_BITMAP_BITS_SHIFT :: !Int
  - pc_TAG_BITS :: !Int
  - pc_LDV_SHIFT :: !Int
  - pc_ILDV_CREATE_MASK :: !Integer
  - pc_ILDV_STATE_CREATE :: !Integer
  - pc_ILDV_STATE_USE :: !Integer
  - pc_USE_INLINE_SRT_FIELD :: !Bool
  }
- lookupPlatformConstants :: [FilePath] -> IO (Maybe PlatformConstants)
- platformConstants :: Platform -> PlatformConstants
- platformSOName :: Platform -> FilePath -> FilePath
- platformHsSOName :: Platform -> FilePath -> FilePath
- platformSOExt :: Platform -> FilePath
- genericPlatform :: Platform

# Documentation

data Platform Source #

Platform description

This is used to describe platforms so that we can generate code for them.

Constructors

Platform |

Fields

- platformArchOS :: !ArchOS

  Architecture and OS

- platformWordSize :: !PlatformWordSize

  Word size

- platformByteOrder :: !ByteOrder

  Byte order (endianness)

- platformUnregisterised :: !Bool
- platformHasGnuNonexecStack :: !Bool
- platformHasIdentDirective :: !Bool
- platformHasSubsectionsViaSymbols :: !Bool
- platformIsCrossCompiling :: !Bool
- platformLeadingUnderscore :: !Bool

  Symbols need underscore prefix

- platformTablesNextToCode :: !Bool

  Determines whether we will be compiling info tables that reside just before the entry code, or with an indirection to the entry code. See TABLES_NEXT_TO_CODE in rtsincludertsstorageInfoTables.h.

- platformHasLibm :: !Bool

  Some platforms require that we explicitly link against `libm` if any math-y things are used (which we assume to include all programs). See #14022.

- platform_constants :: !(Maybe PlatformConstants)

  Constants such as structure offsets, type sizes, etc.

#### Instances

Instances details

Read Platform Source # |
Instance details Defined in GHC.Platform Methods readsPrec :: Int -> ReadS Platform Source # readList :: ReadS [Platform] Source # readPrec :: ReadPrec Platform Source # readListPrec :: ReadPrec [Platform] Source #
Show Platform Source # |
Instance details Defined in GHC.Platform Methods showsPrec :: Int -> Platform -> ShowS Source # show :: Platform -> String Source # showList :: [Platform] -> ShowS Source #
Eq Platform Source # |
Instance details Defined in GHC.Platform Methods (==) :: Platform -> Platform -> Bool # (/=) :: Platform -> Platform -> Bool #
Ord Platform Source # |
Instance details Defined in GHC.Platform Methods compare :: Platform -> Platform -> Ordering # (<) :: Platform -> Platform -> Bool # (<=) :: Platform -> Platform -> Bool # (>) :: Platform -> Platform -> Bool # (>=) :: Platform -> Platform -> Bool # max :: Platform -> Platform -> Platform # min :: Platform -> Platform -> Platform #
OutputableP Platform CmmGraph Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmGraph -> SDoc Source #
OutputableP Platform CmmInfoTable Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmInfoTable -> SDoc Source #
OutputableP Platform CmmStatic Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmStatic -> SDoc Source #
OutputableP Platform CmmTopInfo Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmTopInfo -> SDoc Source #
OutputableP Platform CLabel Source # |
Instance details Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> CLabel -> SDoc Source #
OutputableP Platform InfoProvEnt Source # |
Instance details Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> InfoProvEnt -> SDoc Source #
OutputableP Platform DebugBlock Source # |
Instance details Defined in GHC.Cmm.DebugBlock Methods pdoc :: Platform -> DebugBlock -> SDoc Source #
OutputableP Platform UnwindExpr Source # |
Instance details Defined in GHC.Cmm.DebugBlock Methods pdoc :: Platform -> UnwindExpr -> SDoc Source #
OutputableP Platform UnwindPoint Source # |
Instance details Defined in GHC.Cmm.DebugBlock Methods pdoc :: Platform -> UnwindPoint -> SDoc Source #
OutputableP Platform CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmExpr -> SDoc Source #
OutputableP Platform CmmLit Source # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmLit -> SDoc Source #
OutputableP Platform ForeignTarget Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> ForeignTarget -> SDoc Source #
OutputableP Platform DwarfFrameBlock Source # |
Instance details Defined in GHC.CmmToAsm.Dwarf.Types Methods pdoc :: Platform -> DwarfFrameBlock -> SDoc Source #
OutputableP Platform LiveInfo Source # |
Instance details Defined in GHC.CmmToAsm.Reg.Liveness Methods pdoc :: Platform -> LiveInfo -> SDoc Source #
OutputableP Platform CgLoc Source # |
Instance details Defined in GHC.StgToCmm.Closure Methods pdoc :: Platform -> CgLoc -> SDoc Source #
OutputableP Platform CgIdInfo Source # |
Instance details Defined in GHC.StgToCmm.Monad Methods pdoc :: Platform -> CgIdInfo -> SDoc Source #
OutputableP Platform (GenCmmStatics a) Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> GenCmmStatics a -> SDoc Source #
OutputableP Platform (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> CmmNode e x -> SDoc Source #
(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> GenCmmDecl d info i -> SDoc Source #
OutputableP Platform (Block CmmNode C C) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode C C -> SDoc Source #
OutputableP Platform (Block CmmNode C O) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode C O -> SDoc Source #
OutputableP Platform (Block CmmNode O C) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode O C -> SDoc Source #
OutputableP Platform (Block CmmNode O O) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode O O -> SDoc Source #
OutputableP Platform (Graph CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Graph CmmNode e x -> SDoc Source #

data PlatformWordSize Source #

Constructors

PW4 | A 32-bit platform
PW8 | A 64-bit platform

#### Instances

Instances details

Read PlatformWordSize Source # |
Instance details Defined in GHC.Platform Methods readsPrec :: Int -> ReadS PlatformWordSize Source # readList :: ReadS [PlatformWordSize] Source # readPrec :: ReadPrec PlatformWordSize Source # readListPrec :: ReadPrec [PlatformWordSize] Source #
Show PlatformWordSize Source # |
Instance details Defined in GHC.Platform Methods showsPrec :: Int -> PlatformWordSize -> ShowS Source # show :: PlatformWordSize -> String Source # showList :: [PlatformWordSize] -> ShowS Source #
Eq PlatformWordSize Source # |
Instance details Defined in GHC.Platform Methods (==) :: PlatformWordSize -> PlatformWordSize -> Bool # (/=) :: PlatformWordSize -> PlatformWordSize -> Bool #
Ord PlatformWordSize Source # |

Instance details

Defined in GHC.Platform

Methods

compare :: PlatformWordSize -> PlatformWordSize -> Ordering #

(<) :: PlatformWordSize -> PlatformWordSize -> Bool #

(<=) :: PlatformWordSize -> PlatformWordSize -> Bool #

(>) :: PlatformWordSize -> PlatformWordSize -> Bool #

(>=) :: PlatformWordSize -> PlatformWordSize -> Bool #

max :: PlatformWordSize -> PlatformWordSize -> PlatformWordSize #

min :: PlatformWordSize -> PlatformWordSize -> PlatformWordSize #

platformArch :: Platform -> Arch Source #

Platform architecture

platformOS :: Platform -> OS Source #

Platform OS

data ArchOS Source #

Platform architecture and OS.

Constructors

ArchOS |

Fields

- archOS_arch :: Arch
- archOS_OS :: OS

#### Instances

Instances details

Read ArchOS |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArchOS Source # readList :: ReadS [ArchOS] Source # readPrec :: ReadPrec ArchOS Source # readListPrec :: ReadPrec [ArchOS] Source #
Show ArchOS |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArchOS -> ShowS Source # show :: ArchOS -> String Source # showList :: [ArchOS] -> ShowS Source #
Eq ArchOS |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArchOS -> ArchOS -> Bool # (/=) :: ArchOS -> ArchOS -> Bool #
Ord ArchOS |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArchOS -> ArchOS -> Ordering # (<) :: ArchOS -> ArchOS -> Bool # (<=) :: ArchOS -> ArchOS -> Bool # (>) :: ArchOS -> ArchOS -> Bool # (>=) :: ArchOS -> ArchOS -> Bool # max :: ArchOS -> ArchOS -> ArchOS # min :: ArchOS -> ArchOS -> ArchOS #

data Arch Source #

Architectures

TODO: It might be nice to extend these constructors with information about what instruction set extensions an architecture might support.

Constructors

ArchUnknown |
ArchX86 |
ArchX86_64 |
ArchPPC |
ArchPPC_64 PPC_64ABI |
ArchS390X |
ArchARM ArmISA [ArmISAExt] ArmABI |
ArchAArch64 |
ArchAlpha |
ArchMipseb |
ArchMipsel |
ArchRISCV64 |
ArchLoongArch64 |
ArchJavaScript |
ArchWasm32 |

#### Instances

Instances details

Read Arch |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS Arch Source # readList :: ReadS [Arch] Source # readPrec :: ReadPrec Arch Source # readListPrec :: ReadPrec [Arch] Source #
Show Arch |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> Arch -> ShowS Source # show :: Arch -> String Source # showList :: [Arch] -> ShowS Source #
Eq Arch |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: Arch -> Arch -> Bool # (/=) :: Arch -> Arch -> Bool #
Ord Arch |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: Arch -> Arch -> Ordering # (<) :: Arch -> Arch -> Bool # (<=) :: Arch -> Arch -> Bool # (>) :: Arch -> Arch -> Bool # (>=) :: Arch -> Arch -> Bool # max :: Arch -> Arch -> Arch # min :: Arch -> Arch -> Arch #

data OS Source #

Operating systems.

Using OSUnknown to generate code should produce a sensible default, but no promises.

Constructors

OSUnknown |
OSLinux |
OSDarwin |
OSSolaris2 |
OSMinGW32 |
OSFreeBSD |
OSDragonFly |
OSOpenBSD |
OSNetBSD |
OSKFreeBSD |
OSHaiku |
OSQNXNTO |
OSAIX |
OSHurd |
OSWasi |
OSGhcjs |

#### Instances

Instances details

Read OS |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS OS Source # readList :: ReadS [OS] Source # readPrec :: ReadPrec OS Source # readListPrec :: ReadPrec [OS] Source #
Show OS |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> OS -> ShowS Source # show :: OS -> String Source # showList :: [OS] -> ShowS Source #
Eq OS |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: OS -> OS -> Bool # (/=) :: OS -> OS -> Bool #
Ord OS |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: OS -> OS -> Ordering # (<) :: OS -> OS -> Bool # (<=) :: OS -> OS -> Bool # (>) :: OS -> OS -> Bool # (>=) :: OS -> OS -> Bool # max :: OS -> OS -> OS # min :: OS -> OS -> OS #

data ArmISA Source #

ARM Instruction Set Architecture

Constructors

ARMv5 |
ARMv6 |
ARMv7 |

#### Instances

Instances details

Read ArmISA |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmISA Source # readList :: ReadS [ArmISA] Source # readPrec :: ReadPrec ArmISA Source # readListPrec :: ReadPrec [ArmISA] Source #
Show ArmISA |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISA -> ShowS Source # show :: ArmISA -> String Source # showList :: [ArmISA] -> ShowS Source #
Eq ArmISA |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmISA -> ArmISA -> Bool # (/=) :: ArmISA -> ArmISA -> Bool #
Ord ArmISA |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmISA -> ArmISA -> Ordering # (<) :: ArmISA -> ArmISA -> Bool # (<=) :: ArmISA -> ArmISA -> Bool # (>) :: ArmISA -> ArmISA -> Bool # (>=) :: ArmISA -> ArmISA -> Bool # max :: ArmISA -> ArmISA -> ArmISA # min :: ArmISA -> ArmISA -> ArmISA #

data ArmISAExt Source #

ARM extensions

Constructors

VFPv2 |
VFPv3 |
VFPv3D16 |
NEON |
IWMMX2 |

#### Instances

Instances details

Read ArmISAExt |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmISAExt Source # readList :: ReadS [ArmISAExt] Source # readPrec :: ReadPrec ArmISAExt Source # readListPrec :: ReadPrec [ArmISAExt] Source #
Show ArmISAExt |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISAExt -> ShowS Source # show :: ArmISAExt -> String Source # showList :: [ArmISAExt] -> ShowS Source #
Eq ArmISAExt |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmISAExt -> ArmISAExt -> Bool # (/=) :: ArmISAExt -> ArmISAExt -> Bool #
Ord ArmISAExt |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmISAExt -> ArmISAExt -> Ordering # (<) :: ArmISAExt -> ArmISAExt -> Bool # (<=) :: ArmISAExt -> ArmISAExt -> Bool # (>) :: ArmISAExt -> ArmISAExt -> Bool # (>=) :: ArmISAExt -> ArmISAExt -> Bool # max :: ArmISAExt -> ArmISAExt -> ArmISAExt # min :: ArmISAExt -> ArmISAExt -> ArmISAExt #

data ArmABI Source #

ARM ABI

Constructors

SOFT |
SOFTFP |
HARD |

#### Instances

Instances details

Read ArmABI |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmABI Source # readList :: ReadS [ArmABI] Source # readPrec :: ReadPrec ArmABI Source # readListPrec :: ReadPrec [ArmABI] Source #
Show ArmABI |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmABI -> ShowS Source # show :: ArmABI -> String Source # showList :: [ArmABI] -> ShowS Source #
Eq ArmABI |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmABI -> ArmABI -> Bool # (/=) :: ArmABI -> ArmABI -> Bool #
Ord ArmABI |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmABI -> ArmABI -> Ordering # (<) :: ArmABI -> ArmABI -> Bool # (<=) :: ArmABI -> ArmABI -> Bool # (>) :: ArmABI -> ArmABI -> Bool # (>=) :: ArmABI -> ArmABI -> Bool # max :: ArmABI -> ArmABI -> ArmABI # min :: ArmABI -> ArmABI -> ArmABI #

data PPC_64ABI Source #

PowerPC 64-bit ABI

Constructors

ELF_V1 | PowerPC64
ELF_V2 | PowerPC64 LE

#### Instances

Instances details

Read PPC_64ABI |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS PPC_64ABI Source # readList :: ReadS [PPC_64ABI] Source # readPrec :: ReadPrec PPC_64ABI Source # readListPrec :: ReadPrec [PPC_64ABI] Source #
Show PPC_64ABI |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> PPC_64ABI -> ShowS Source # show :: PPC_64ABI -> String Source # showList :: [PPC_64ABI] -> ShowS Source #
Eq PPC_64ABI |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: PPC_64ABI -> PPC_64ABI -> Bool # (/=) :: PPC_64ABI -> PPC_64ABI -> Bool #
Ord PPC_64ABI |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: PPC_64ABI -> PPC_64ABI -> Ordering # (<) :: PPC_64ABI -> PPC_64ABI -> Bool # (<=) :: PPC_64ABI -> PPC_64ABI -> Bool # (>) :: PPC_64ABI -> PPC_64ABI -> Bool # (>=) :: PPC_64ABI -> PPC_64ABI -> Bool # max :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI # min :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI #

data ByteOrder Source #

Byte ordering.

Constructors

BigEndian | most-significant-byte occurs in lowest address.
LittleEndian | least-significant-byte occurs in lowest address.

#### Instances

Instances details

Bounded ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.ByteOrder Methods minBound :: ByteOrder Source # maxBound :: ByteOrder Source #
Enum ByteOrder | Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Methods

succ :: ByteOrder -> ByteOrder Source #

pred :: ByteOrder -> ByteOrder Source #

toEnum :: Int -> ByteOrder Source #

fromEnum :: ByteOrder -> Int Source #

enumFrom :: ByteOrder -> [ByteOrder] Source #

enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder] Source #

enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder] Source #

enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder] Source #

Generic ByteOrder |
Instance details Defined in GHC.ByteOrder Associated Types type Rep ByteOrder :: Type -> Type Source # Methods from :: ByteOrder -> Rep ByteOrder x Source # to :: Rep ByteOrder x -> ByteOrder Source #
Read ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.ByteOrder Methods readsPrec :: Int -> ReadS ByteOrder Source # readList :: ReadS [ByteOrder] Source # readPrec :: ReadPrec ByteOrder Source # readListPrec :: ReadPrec [ByteOrder] Source #
Show ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.ByteOrder Methods showsPrec :: Int -> ByteOrder -> ShowS Source # show :: ByteOrder -> String Source # showList :: [ByteOrder] -> ShowS Source #
Eq ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.ByteOrder Methods (==) :: ByteOrder -> ByteOrder -> Bool # (/=) :: ByteOrder -> ByteOrder -> Bool #
Ord ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.ByteOrder Methods compare :: ByteOrder -> ByteOrder -> Ordering # (<) :: ByteOrder -> ByteOrder -> Bool # (<=) :: ByteOrder -> ByteOrder -> Bool # (>) :: ByteOrder -> ByteOrder -> Bool # (>=) :: ByteOrder -> ByteOrder -> Bool # max :: ByteOrder -> ByteOrder -> ByteOrder # min :: ByteOrder -> ByteOrder -> ByteOrder #
type Rep ByteOrder | Since: base-4.15.0.0
Instance details Defined in GHC.ByteOrder type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.ByteOrder" "base" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

target32Bit :: Platform -> Bool Source #

This predicate tells us whether the platform is 32-bit.

isARM :: Arch -> Bool Source #

osElfTarget :: OS -> Bool Source #

This predicate tells us whether the OS supports ELF-like shared libraries.

osMachOTarget :: OS -> Bool Source #

This predicate tells us whether the OS support Mach-O shared libraries.

osSubsectionsViaSymbols :: OS -> Bool Source #

platformUsesFrameworks :: Platform -> Bool Source #

platformWordSizeInBytes :: Platform -> Int Source #

platformWordSizeInBits :: Platform -> Int Source #

platformMinInt :: Platform -> Integer Source #

Minimum representable Int value for the given platform

platformMaxInt :: Platform -> Integer Source #

Maximum representable Int value for the given platform

platformMaxWord :: Platform -> Integer Source #

Maximum representable Word value for the given platform

platformInIntRange :: Platform -> Integer -> Bool Source #

Test if the given Integer is representable with a platform Int

platformInWordRange :: Platform -> Integer -> Bool Source #

Test if the given Integer is representable with a platform Word

platformCConvNeedsExtension :: Platform -> Bool Source #

For some architectures the C calling convention is that any integer shorter than 64 bits is replaced by its 64 bits representation using sign or zero extension.

data PlatformMisc Source #

Platform-specific settings formerly hard-coded in Config.hs.

These should probably be all be triaged whether they can be computed from other settings or belong in another another place (like `Platform` above).

Constructors

PlatformMisc |

Fields

- platformMisc_targetPlatformString :: String
- platformMisc_ghcWithInterpreter :: Bool
- platformMisc_libFFI :: Bool
- platformMisc_llvmTarget :: String

data SseVersion Source #

x86 SSE instructions

Constructors

SSE1 |
SSE2 |
SSE3 |
SSE4 |
SSE42 |

#### Instances

Instances details

Eq SseVersion Source # |
Instance details Defined in GHC.Platform Methods (==) :: SseVersion -> SseVersion -> Bool # (/=) :: SseVersion -> SseVersion -> Bool #
Ord SseVersion Source # |
Instance details Defined in GHC.Platform Methods compare :: SseVersion -> SseVersion -> Ordering # (<) :: SseVersion -> SseVersion -> Bool # (<=) :: SseVersion -> SseVersion -> Bool # (>) :: SseVersion -> SseVersion -> Bool # (>=) :: SseVersion -> SseVersion -> Bool # max :: SseVersion -> SseVersion -> SseVersion # min :: SseVersion -> SseVersion -> SseVersion #

data BmiVersion Source #

x86 BMI (bit manipulation) instructions

Constructors

BMI1 |
BMI2 |

#### Instances

Instances details

Eq BmiVersion Source # |
Instance details Defined in GHC.Platform Methods (==) :: BmiVersion -> BmiVersion -> Bool # (/=) :: BmiVersion -> BmiVersion -> Bool #
Ord BmiVersion Source # |
Instance details Defined in GHC.Platform Methods compare :: BmiVersion -> BmiVersion -> Ordering # (<) :: BmiVersion -> BmiVersion -> Bool # (<=) :: BmiVersion -> BmiVersion -> Bool # (>) :: BmiVersion -> BmiVersion -> Bool # (>=) :: BmiVersion -> BmiVersion -> Bool # max :: BmiVersion -> BmiVersion -> BmiVersion # min :: BmiVersion -> BmiVersion -> BmiVersion #

wordAlignment :: Platform -> Alignment Source #

# SSE and AVX

isSseEnabled :: Platform -> Bool Source #

isSse2Enabled :: Platform -> Bool Source #

# Platform constants

data PlatformConstants Source #

Constructors

PlatformConstants |

Fields

- pc_CONTROL_GROUP_CONST_291 :: !Int
- pc_STD_HDR_SIZE :: !Int
- pc_PROF_HDR_SIZE :: !Int
- pc_BLOCK_SIZE :: !Int
- pc_BLOCKS_PER_MBLOCK :: !Int
- pc_TICKY_BIN_COUNT :: !Int
- pc_OFFSET_StgRegTable_rR1 :: !Int
- pc_OFFSET_StgRegTable_rR2 :: !Int
- pc_OFFSET_StgRegTable_rR3 :: !Int
- pc_OFFSET_StgRegTable_rR4 :: !Int
- pc_OFFSET_StgRegTable_rR5 :: !Int
- pc_OFFSET_StgRegTable_rR6 :: !Int
- pc_OFFSET_StgRegTable_rR7 :: !Int
- pc_OFFSET_StgRegTable_rR8 :: !Int
- pc_OFFSET_StgRegTable_rR9 :: !Int
- pc_OFFSET_StgRegTable_rR10 :: !Int
- pc_OFFSET_StgRegTable_rF1 :: !Int
- pc_OFFSET_StgRegTable_rF2 :: !Int
- pc_OFFSET_StgRegTable_rF3 :: !Int
- pc_OFFSET_StgRegTable_rF4 :: !Int
- pc_OFFSET_StgRegTable_rF5 :: !Int
- pc_OFFSET_StgRegTable_rF6 :: !Int
- pc_OFFSET_StgRegTable_rD1 :: !Int
- pc_OFFSET_StgRegTable_rD2 :: !Int
- pc_OFFSET_StgRegTable_rD3 :: !Int
- pc_OFFSET_StgRegTable_rD4 :: !Int
- pc_OFFSET_StgRegTable_rD5 :: !Int
- pc_OFFSET_StgRegTable_rD6 :: !Int
- pc_OFFSET_StgRegTable_rXMM1 :: !Int
- pc_OFFSET_StgRegTable_rXMM2 :: !Int
- pc_OFFSET_StgRegTable_rXMM3 :: !Int
- pc_OFFSET_StgRegTable_rXMM4 :: !Int
- pc_OFFSET_StgRegTable_rXMM5 :: !Int
- pc_OFFSET_StgRegTable_rXMM6 :: !Int
- pc_OFFSET_StgRegTable_rYMM1 :: !Int
- pc_OFFSET_StgRegTable_rYMM2 :: !Int
- pc_OFFSET_StgRegTable_rYMM3 :: !Int
- pc_OFFSET_StgRegTable_rYMM4 :: !Int
- pc_OFFSET_StgRegTable_rYMM5 :: !Int
- pc_OFFSET_StgRegTable_rYMM6 :: !Int
- pc_OFFSET_StgRegTable_rZMM1 :: !Int
- pc_OFFSET_StgRegTable_rZMM2 :: !Int
- pc_OFFSET_StgRegTable_rZMM3 :: !Int
- pc_OFFSET_StgRegTable_rZMM4 :: !Int
- pc_OFFSET_StgRegTable_rZMM5 :: !Int
- pc_OFFSET_StgRegTable_rZMM6 :: !Int
- pc_OFFSET_StgRegTable_rL1 :: !Int
- pc_OFFSET_StgRegTable_rSp :: !Int
- pc_OFFSET_StgRegTable_rSpLim :: !Int
- pc_OFFSET_StgRegTable_rHp :: !Int
- pc_OFFSET_StgRegTable_rHpLim :: !Int
- pc_OFFSET_StgRegTable_rCCCS :: !Int
- pc_OFFSET_StgRegTable_rCurrentTSO :: !Int
- pc_OFFSET_StgRegTable_rCurrentNursery :: !Int
- pc_OFFSET_StgRegTable_rHpAlloc :: !Int
- pc_OFFSET_stgEagerBlackholeInfo :: !Int
- pc_OFFSET_stgGCEnter1 :: !Int
- pc_OFFSET_stgGCFun :: !Int
- pc_OFFSET_Capability_r :: !Int
- pc_OFFSET_bdescr_start :: !Int
- pc_OFFSET_bdescr_free :: !Int
- pc_OFFSET_bdescr_blocks :: !Int
- pc_OFFSET_bdescr_flags :: !Int
- pc_SIZEOF_CostCentreStack :: !Int
- pc_OFFSET_CostCentreStack_mem_alloc :: !Int
- pc_REP_CostCentreStack_mem_alloc :: !Int
- pc_OFFSET_CostCentreStack_scc_count :: !Int
- pc_REP_CostCentreStack_scc_count :: !Int
- pc_OFFSET_StgHeader_ccs :: !Int
- pc_OFFSET_StgHeader_ldvw :: !Int
- pc_SIZEOF_StgSMPThunkHeader :: !Int
- pc_OFFSET_StgEntCounter_allocs :: !Int
- pc_REP_StgEntCounter_allocs :: !Int
- pc_OFFSET_StgEntCounter_allocd :: !Int
- pc_REP_StgEntCounter_allocd :: !Int
- pc_OFFSET_StgEntCounter_registeredp :: !Int
- pc_OFFSET_StgEntCounter_link :: !Int
- pc_OFFSET_StgEntCounter_entry_count :: !Int
- pc_SIZEOF_StgUpdateFrame_NoHdr :: !Int
- pc_SIZEOF_StgMutArrPtrs_NoHdr :: !Int
- pc_OFFSET_StgMutArrPtrs_ptrs :: !Int
- pc_OFFSET_StgMutArrPtrs_size :: !Int
- pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: !Int
- pc_OFFSET_StgSmallMutArrPtrs_ptrs :: !Int
- pc_SIZEOF_StgArrBytes_NoHdr :: !Int
- pc_OFFSET_StgArrBytes_bytes :: !Int
- pc_OFFSET_StgTSO_alloc_limit :: !Int
- pc_OFFSET_StgTSO_cccs :: !Int
- pc_OFFSET_StgTSO_stackobj :: !Int
- pc_OFFSET_StgStack_sp :: !Int
- pc_OFFSET_StgStack_stack :: !Int
- pc_OFFSET_StgUpdateFrame_updatee :: !Int
- pc_OFFSET_StgFunInfoExtraFwd_arity :: !Int
- pc_REP_StgFunInfoExtraFwd_arity :: !Int
- pc_SIZEOF_StgFunInfoExtraRev :: !Int
- pc_OFFSET_StgFunInfoExtraRev_arity :: !Int
- pc_REP_StgFunInfoExtraRev_arity :: !Int
- pc_MAX_SPEC_SELECTEE_SIZE :: !Int
- pc_MAX_SPEC_AP_SIZE :: !Int
- pc_MIN_PAYLOAD_SIZE :: !Int
- pc_MIN_INTLIKE :: !Int
- pc_MAX_INTLIKE :: !Int
- pc_MIN_CHARLIKE :: !Int
- pc_MAX_CHARLIKE :: !Int
- pc_MUT_ARR_PTRS_CARD_BITS :: !Int
- pc_MAX_Vanilla_REG :: !Int
- pc_MAX_Float_REG :: !Int
- pc_MAX_Double_REG :: !Int
- pc_MAX_Long_REG :: !Int
- pc_MAX_XMM_REG :: !Int
- pc_MAX_Real_Vanilla_REG :: !Int
- pc_MAX_Real_Float_REG :: !Int
- pc_MAX_Real_Double_REG :: !Int
- pc_MAX_Real_XMM_REG :: !Int
- pc_MAX_Real_Long_REG :: !Int
- pc_RESERVED_C_STACK_BYTES :: !Int
- pc_RESERVED_STACK_WORDS :: !Int
- pc_AP_STACK_SPLIM :: !Int
- pc_WORD_SIZE :: !Int
- pc_CINT_SIZE :: !Int
- pc_CLONG_SIZE :: !Int
- pc_CLONG_LONG_SIZE :: !Int
- pc_BITMAP_BITS_SHIFT :: !Int
- pc_TAG_BITS :: !Int
- pc_LDV_SHIFT :: !Int
- pc_ILDV_CREATE_MASK :: !Integer
- pc_ILDV_STATE_CREATE :: !Integer
- pc_ILDV_STATE_USE :: !Integer
- pc_USE_INLINE_SRT_FIELD :: !Bool

#### Instances

Instances details

Read PlatformConstants Source # |
Instance details Defined in GHC.Platform.Constants Methods readsPrec :: Int -> ReadS PlatformConstants Source # readList :: ReadS [PlatformConstants] Source # readPrec :: ReadPrec PlatformConstants Source # readListPrec :: ReadPrec [PlatformConstants] Source #
Show PlatformConstants Source # |
Instance details Defined in GHC.Platform.Constants Methods showsPrec :: Int -> PlatformConstants -> ShowS Source # show :: PlatformConstants -> String Source # showList :: [PlatformConstants] -> ShowS Source #
Eq PlatformConstants Source # |
Instance details Defined in GHC.Platform.Constants Methods (==) :: PlatformConstants -> PlatformConstants -> Bool # (/=) :: PlatformConstants -> PlatformConstants -> Bool #
Ord PlatformConstants Source # |

Instance details

Defined in GHC.Platform.Constants

Methods

compare :: PlatformConstants -> PlatformConstants -> Ordering #

(<) :: PlatformConstants -> PlatformConstants -> Bool #

(<=) :: PlatformConstants -> PlatformConstants -> Bool #

(>) :: PlatformConstants -> PlatformConstants -> Bool #

(>=) :: PlatformConstants -> PlatformConstants -> Bool #

max :: PlatformConstants -> PlatformConstants -> PlatformConstants #

min :: PlatformConstants -> PlatformConstants -> PlatformConstants #

lookupPlatformConstants :: [FilePath] -> IO (Maybe PlatformConstants) Source #

Try to locate "DerivedConstants.h" file in the given dirs and to parse the PlatformConstants from it.

See Note [Platform constants]

platformConstants :: Platform -> PlatformConstants Source #

# Shared libraries

platformSOName :: Platform -> FilePath -> FilePath Source #

platformHsSOName :: Platform -> FilePath -> FilePath Source #

platformSOExt :: Platform -> FilePath Source #

genericPlatform :: Platform Source #