ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

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
- platformHasRTSLinker :: 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_StgOrigThunkInfoFrame_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_StgOrigThunkInfoFrame_info_ptr :: !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 #

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 # |
Instance details Defined in GHC.Platform Methods readsPrec :: Int -> ReadS Platform # readList :: ReadS [Platform] # readPrec :: ReadPrec Platform # readListPrec :: ReadPrec [Platform] #
Show Platform # |
Instance details Defined in GHC.Platform Methods showsPrec :: Int -> Platform -> ShowS # show :: Platform -> String # showList :: [Platform] -> ShowS #
Eq Platform # |
Instance details Defined in GHC.Platform Methods (==) :: Platform -> Platform -> Bool # (/=) :: Platform -> Platform -> Bool #
Ord Platform # |
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 # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmGraph -> SDoc #
OutputableP Platform CmmInfoTable # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmInfoTable -> SDoc #
OutputableP Platform CmmStatic # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmStatic -> SDoc #
OutputableP Platform CmmTopInfo # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmTopInfo -> SDoc #
OutputableP Platform CLabel # |
Instance details Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> CLabel -> SDoc #
OutputableP Platform InfoProvEnt # |
Instance details Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> InfoProvEnt -> SDoc #
OutputableP Platform CmmExpr # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmExpr -> SDoc #
OutputableP Platform CmmLit # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmLit -> SDoc #
OutputableP Platform ForeignTarget # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> ForeignTarget -> SDoc #
OutputableP Platform (GenCmmStatics a) # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> GenCmmStatics a -> SDoc #
OutputableP Platform (CmmNode e x) # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> CmmNode e x -> SDoc #
(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> GenCmmDecl d info i -> SDoc #
OutputableP Platform (Block CmmNode C C) # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode C C -> SDoc #
OutputableP Platform (Block CmmNode C O) # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode C O -> SDoc #
OutputableP Platform (Block CmmNode O C) # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode O C -> SDoc #
OutputableP Platform (Block CmmNode O O) # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode O O -> SDoc #
OutputableP Platform (Graph CmmNode e x) # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Graph CmmNode e x -> SDoc #

data PlatformWordSize #

Constructors

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

#### Instances

Instances details

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

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 #

Platform architecture

platformOS :: Platform -> OS #

Platform OS

data ArchOS #

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 # readList :: ReadS [ArchOS] # readPrec :: ReadPrec ArchOS # readListPrec :: ReadPrec [ArchOS] #
Show ArchOS # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArchOS -> ShowS # show :: ArchOS -> String # showList :: [ArchOS] -> ShowS #
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 #

Architectures

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 # readList :: ReadS [Arch] # readPrec :: ReadPrec Arch # readListPrec :: ReadPrec [Arch] #
Show Arch # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> Arch -> ShowS # show :: Arch -> String # showList :: [Arch] -> ShowS #
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 #

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 # readList :: ReadS [OS] # readPrec :: ReadPrec OS # readListPrec :: ReadPrec [OS] #
Show OS # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> OS -> ShowS # show :: OS -> String # showList :: [OS] -> ShowS #
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 #

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 # readList :: ReadS [ArmISA] # readPrec :: ReadPrec ArmISA # readListPrec :: ReadPrec [ArmISA] #
Show ArmISA # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISA -> ShowS # show :: ArmISA -> String # showList :: [ArmISA] -> ShowS #
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 #

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 # readList :: ReadS [ArmISAExt] # readPrec :: ReadPrec ArmISAExt # readListPrec :: ReadPrec [ArmISAExt] #
Show ArmISAExt # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISAExt -> ShowS # show :: ArmISAExt -> String # showList :: [ArmISAExt] -> ShowS #
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 #

ARM ABI

Constructors

SOFT |
SOFTFP |
HARD |

#### Instances

Instances details

Read ArmABI # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmABI # readList :: ReadS [ArmABI] # readPrec :: ReadPrec ArmABI # readListPrec :: ReadPrec [ArmABI] #
Show ArmABI # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmABI -> ShowS # show :: ArmABI -> String # showList :: [ArmABI] -> ShowS #
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 #

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 # readList :: ReadS [PPC_64ABI] # readPrec :: ReadPrec PPC_64ABI # readListPrec :: ReadPrec [PPC_64ABI] #
Show PPC_64ABI # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> PPC_64ABI -> ShowS # show :: PPC_64ABI -> String # showList :: [PPC_64ABI] -> ShowS #
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 #

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.Internal.ByteOrder Methods minBound :: ByteOrder # maxBound :: ByteOrder #
Enum ByteOrder | @since base-4.11.0.0

Instance details

Defined in GHC.Internal.ByteOrder

Methods

succ :: ByteOrder -> ByteOrder #

pred :: ByteOrder -> ByteOrder #

toEnum :: Int -> ByteOrder #

fromEnum :: ByteOrder -> Int #

enumFrom :: ByteOrder -> [ByteOrder] #

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

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

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

Generic ByteOrder |

Instance details

Defined in GHC.Internal.ByteOrder

Associated Types

type Rep ByteOrder | @since base-4.15.0.0
Instance details Defined in GHC.Internal.ByteOrder type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.Internal.ByteOrder" "ghc-internal" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: ByteOrder -> Rep ByteOrder x #

to :: Rep ByteOrder x -> ByteOrder #

Read ByteOrder | @since base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods readsPrec :: Int -> ReadS ByteOrder # readList :: ReadS [ByteOrder] # readPrec :: ReadPrec ByteOrder # readListPrec :: ReadPrec [ByteOrder] #
Show ByteOrder | @since base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods showsPrec :: Int -> ByteOrder -> ShowS # show :: ByteOrder -> String # showList :: [ByteOrder] -> ShowS #
Eq ByteOrder | @since base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods (==) :: ByteOrder -> ByteOrder -> Bool # (/=) :: ByteOrder -> ByteOrder -> Bool #
Ord ByteOrder | @since base-4.11.0.0
Instance details Defined in GHC.Internal.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.Internal.ByteOrder type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.Internal.ByteOrder" "ghc-internal" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

target32Bit :: Platform -> Bool #

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

isARM :: Arch -> Bool #

osElfTarget :: OS -> Bool #

This predicate tells us whether the OS uses the ELF as its primary object format.

osMachOTarget :: OS -> Bool #

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

osSubsectionsViaSymbols :: OS -> Bool #

platformUsesFrameworks :: Platform -> Bool #

platformWordSizeInBytes :: Platform -> Int #

platformWordSizeInBits :: Platform -> Int #

platformMinInt :: Platform -> Integer #

Minimum representable Int value for the given platform

platformMaxInt :: Platform -> Integer #

Maximum representable Int value for the given platform

platformMaxWord :: Platform -> Integer #

Maximum representable Word value for the given platform

platformInIntRange :: Platform -> Integer -> Bool #

Test if the given Integer is representable with a platform Int

platformInWordRange :: Platform -> Integer -> Bool #

Test if the given Integer is representable with a platform Word

platformCConvNeedsExtension :: Platform -> Bool #

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.

platformHasRTSLinker :: Platform -> Bool #

Does this platform have an RTS linker?

data PlatformMisc #

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 #

x86 SSE instructions

Constructors

SSE1 |
SSE2 |
SSE3 |
SSE4 |
SSE42 |

#### Instances

Instances details

Eq SseVersion # |
Instance details Defined in GHC.Platform Methods (==) :: SseVersion -> SseVersion -> Bool # (/=) :: SseVersion -> SseVersion -> Bool #
Ord SseVersion # |
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 #

x86 BMI (bit manipulation) instructions

Constructors

BMI1 |
BMI2 |

#### Instances

Instances details

Eq BmiVersion # |
Instance details Defined in GHC.Platform Methods (==) :: BmiVersion -> BmiVersion -> Bool # (/=) :: BmiVersion -> BmiVersion -> Bool #
Ord BmiVersion # |
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 #

# SSE and AVX

isSseEnabled :: Platform -> Bool #

isSse2Enabled :: Platform -> Bool #

# Platform constants

data PlatformConstants #

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_StgOrigThunkInfoFrame_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_StgOrigThunkInfoFrame_info_ptr :: !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 # |
Instance details Defined in GHC.Platform.Constants Methods readsPrec :: Int -> ReadS PlatformConstants # readList :: ReadS [PlatformConstants] # readPrec :: ReadPrec PlatformConstants # readListPrec :: ReadPrec [PlatformConstants] #
Show PlatformConstants # |
Instance details Defined in GHC.Platform.Constants Methods showsPrec :: Int -> PlatformConstants -> ShowS # show :: PlatformConstants -> String # showList :: [PlatformConstants] -> ShowS #
Eq PlatformConstants # |
Instance details Defined in GHC.Platform.Constants Methods (==) :: PlatformConstants -> PlatformConstants -> Bool # (/=) :: PlatformConstants -> PlatformConstants -> Bool #
Ord PlatformConstants # |

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) #

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

See Note [Platform constants]

platformConstants :: Platform -> PlatformConstants #

# Shared libraries

platformSOName :: Platform -> FilePath -> FilePath #

platformHsSOName :: Platform -> FilePath -> FilePath #

platformSOExt :: Platform -> FilePath #

genericPlatform :: Platform #