| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
GHC.Platform
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
- 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
- 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
- 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.
Constructors
| Platform | |
Fields
| |
Instances
data PlatformWordSize #
Instances
| Read PlatformWordSize # | |
Defined in GHC.Platform | |
| Show PlatformWordSize # | |
Defined in GHC.Platform | |
| Eq PlatformWordSize # | |
Defined in GHC.Platform Methods (==) :: PlatformWordSize -> PlatformWordSize -> Bool # (/=) :: PlatformWordSize -> PlatformWordSize -> Bool # | |
| Ord PlatformWordSize # | |
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
Platform architecture and OS.
Constructors
| ArchOS | |
Fields
| |
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 | |
| ArchSPARC | |
| ArchSPARC64 | |
| ArchARM ArmISA [ArmISAExt] ArmABI | |
| ArchAArch64 | |
| ArchAlpha | |
| ArchMipseb | |
| ArchMipsel | |
| ArchRISCV64 | |
| ArchJavaScript |
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 |
Byte ordering.
Constructors
| 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 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 | |
| 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 |
| type Rep ByteOrder | Since: base-4.15.0.0 |
target32Bit :: Platform -> Bool #
This predicate tells us whether the platform is 32-bit.
osElfTarget :: OS -> Bool #
This predicate tells us whether the OS supports ELF-like shared libraries.
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.
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).
data SseVersion #
x86 SSE instructions
Instances
| Eq SseVersion # | |
Defined in GHC.Platform | |
| Ord SseVersion # | |
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
Instances
| Eq BmiVersion # | |
Defined in GHC.Platform | |
| Ord BmiVersion # | |
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 # | |
Platform constants
data PlatformConstants #
Constructors
Instances
| Read PlatformConstants # | |
Defined in GHC.Platform.Constants | |
| Show PlatformConstants # | |
Defined in GHC.Platform.Constants | |
| Eq PlatformConstants # | |
Defined in GHC.Platform.Constants Methods (==) :: PlatformConstants -> PlatformConstants -> Bool # (/=) :: PlatformConstants -> PlatformConstants -> Bool # | |
lookupPlatformConstants :: [FilePath] -> IO (Maybe PlatformConstants) #
Try to locate "DerivedConstants.h" file in the given dirs and to parse the PlatformConstants from it.
See Note [Platform constants]
Shared libraries
platformSOName :: Platform -> FilePath -> FilePath #
platformHsSOName :: Platform -> FilePath -> FilePath #
platformSOExt :: Platform -> FilePath #