Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- platformArch :: Platform -> Arch
- platformOS :: Platform -> OS
- data ArchOS = ArchOS {
- archOS_arch :: Arch
- archOS_OS :: OS
- data Arch
- data OS
- data ArmISA
- data ArmISAExt
- data ArmABI
- data PPC_64ABI
- data ByteOrder
- 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 {}
- data SseVersion
- data BmiVersion
- 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
Platform description
This is used to describe platforms so that we can generate code for them.
Platform | |
|
Instances
Read Platform Source # | |
Show Platform Source # | |
Eq Platform Source # | |
Ord Platform Source # | |
Defined in GHC.Platform | |
OutputableP Platform CmmGraph Source # | |
OutputableP Platform CmmInfoTable Source # | |
OutputableP Platform CmmStatic Source # | |
OutputableP Platform CmmTopInfo Source # | |
OutputableP Platform CLabel Source # | |
OutputableP Platform InfoProvEnt Source # | |
Defined in GHC.Cmm.CLabel | |
OutputableP Platform CmmExpr Source # | |
OutputableP Platform CmmLit Source # | |
OutputableP Platform ForeignTarget Source # | |
Defined in GHC.Cmm.Node | |
OutputableP Platform (GenCmmStatics a) Source # | |
OutputableP Platform (CmmNode e x) Source # | |
(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) Source # | |
OutputableP Platform (Block CmmNode C C) Source # | |
OutputableP Platform (Block CmmNode C O) Source # | |
OutputableP Platform (Block CmmNode O C) Source # | |
OutputableP Platform (Block CmmNode O O) Source # | |
OutputableP Platform (Graph CmmNode e x) Source # | |
data PlatformWordSize Source #
Instances
Read PlatformWordSize Source # | |
Defined in GHC.Platform | |
Show PlatformWordSize Source # | |
Defined in GHC.Platform showsPrec :: Int -> PlatformWordSize -> ShowS # show :: PlatformWordSize -> String # showList :: [PlatformWordSize] -> ShowS # | |
Eq PlatformWordSize Source # | |
Defined in GHC.Platform (==) :: PlatformWordSize -> PlatformWordSize -> Bool # (/=) :: PlatformWordSize -> PlatformWordSize -> Bool # | |
Ord PlatformWordSize Source # | |
Defined in GHC.Platform 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
Platform architecture and OS.
ArchOS | |
|
Architectures
TODO: It might be nice to extend these constructors with information about what instruction set extensions an architecture might support.
ArchUnknown | |
ArchX86 | |
ArchX86_64 | |
ArchPPC | |
ArchPPC_64 PPC_64ABI | |
ArchS390X | |
ArchARM ArmISA [ArmISAExt] ArmABI | |
ArchAArch64 | |
ArchAlpha | |
ArchMipseb | |
ArchMipsel | |
ArchRISCV64 | |
ArchJavaScript | |
ArchWasm32 |
Operating systems.
Using OSUnknown to generate code should produce a sensible default, but no promises.
OSUnknown | |
OSLinux | |
OSDarwin | |
OSSolaris2 | |
OSMinGW32 | |
OSFreeBSD | |
OSDragonFly | |
OSOpenBSD | |
OSNetBSD | |
OSKFreeBSD | |
OSHaiku | |
OSQNXNTO | |
OSAIX | |
OSHurd | |
OSWasi |
ARM Instruction Set Architecture
ARM extensions
PowerPC 64-bit ABI
Byte ordering.
BigEndian | most-significant-byte occurs in lowest address. |
LittleEndian | least-significant-byte occurs in lowest address. |
Instances
Bounded ByteOrder | Since: base-4.11.0.0 |
Enum ByteOrder | Since: base-4.11.0.0 |
Defined in GHC.ByteOrder succ :: ByteOrder -> ByteOrder # pred :: ByteOrder -> ByteOrder # fromEnum :: ByteOrder -> Int # enumFrom :: ByteOrder -> [ByteOrder] # enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder] # enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder] # enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder] # | |
Generic ByteOrder | |
Read ByteOrder | Since: base-4.11.0.0 |
Show ByteOrder | Since: base-4.11.0.0 |
Eq ByteOrder | Since: base-4.11.0.0 |
Ord ByteOrder | Since: base-4.11.0.0 |
Defined in GHC.ByteOrder | |
type Rep ByteOrder | Since: base-4.15.0.0 |
target32Bit :: Platform -> Bool Source #
This predicate tells us whether the platform is 32-bit.
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 #
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).
data SseVersion Source #
x86 SSE instructions
Instances
Eq SseVersion Source # | |
Defined in GHC.Platform (==) :: SseVersion -> SseVersion -> Bool # (/=) :: SseVersion -> SseVersion -> Bool # | |
Ord SseVersion Source # | |
Defined in GHC.Platform 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
Instances
Eq BmiVersion Source # | |
Defined in GHC.Platform (==) :: BmiVersion -> BmiVersion -> Bool # (/=) :: BmiVersion -> BmiVersion -> Bool # | |
Ord BmiVersion Source # | |
Defined in GHC.Platform 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 #
Instances
Read PlatformConstants Source # | |
Defined in GHC.Platform.Constants | |
Show PlatformConstants Source # | |
Defined in GHC.Platform.Constants showsPrec :: Int -> PlatformConstants -> ShowS # show :: PlatformConstants -> String # showList :: [PlatformConstants] -> ShowS # | |
Eq PlatformConstants Source # | |
Defined in GHC.Platform.Constants (==) :: PlatformConstants -> PlatformConstants -> Bool # (/=) :: PlatformConstants -> PlatformConstants -> Bool # | |
Ord PlatformConstants Source # | |
Defined in GHC.Platform.Constants 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 "GhclibDerivedConstants.h" file in the given dirs and to parse the PlatformConstants from it.
See Note [Platform constants]
Shared libraries
platformSOExt :: Platform -> FilePath Source #