ghc-boot-9.0.1: Shared functionality between GHC and its boot libraries
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Platform

Description

A description of the platform we're compiling for.

Synopsis

Documentation

data PlatformMini Source #

Contains the bare-bones arch and os information. This isn't enough for code gen, but useful for tasks where we can fall back upon the host platform, as this is all we know about the host platform.

data Platform Source #

Contains enough information for the native code generator to emit code for this platform.

Constructors

Platform 

Fields

Instances

Instances details
Eq Platform # 
Instance details

Defined in GHC.Platform

Read Platform # 
Instance details

Defined in GHC.Platform

Show Platform # 
Instance details

Defined in GHC.Platform

platformArch :: Platform -> Arch Source #

Legacy accessor

platformOS :: Platform -> OS Source #

Legacy accessor

data Arch Source #

Architectures that the native code generator knows about. TODO: It might be nice to extend these constructors with information about what instruction set extensions an architecture might support.

Instances

Instances details
Eq Arch # 
Instance details

Defined in GHC.Platform

Methods

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

(/=) :: Arch -> Arch -> Bool #

Read Arch # 
Instance details

Defined in GHC.Platform

Show Arch # 
Instance details

Defined in GHC.Platform

data OS Source #

Operating systems that the native code generator knows about. Having OSUnknown should produce a sensible default, but no promises.

Instances

Instances details
Eq OS # 
Instance details

Defined in GHC.Platform

Methods

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

(/=) :: OS -> OS -> Bool #

Read OS # 
Instance details

Defined in GHC.Platform

Show OS # 
Instance details

Defined in GHC.Platform

data ArmISA Source #

ARM Instruction Set Architecture, Extensions and ABI

Constructors

ARMv5 
ARMv6 
ARMv7 

Instances

Instances details
Eq ArmISA # 
Instance details

Defined in GHC.Platform

Methods

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

(/=) :: ArmISA -> ArmISA -> Bool #

Read ArmISA # 
Instance details

Defined in GHC.Platform

Show ArmISA # 
Instance details

Defined in GHC.Platform

data ArmISAExt Source #

Constructors

VFPv2 
VFPv3 
VFPv3D16 
NEON 
IWMMX2 

Instances

Instances details
Eq ArmISAExt # 
Instance details

Defined in GHC.Platform

Read ArmISAExt # 
Instance details

Defined in GHC.Platform

Show ArmISAExt # 
Instance details

Defined in GHC.Platform

data ArmABI Source #

Constructors

SOFT 
SOFTFP 
HARD 

Instances

Instances details
Eq ArmABI # 
Instance details

Defined in GHC.Platform

Methods

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

(/=) :: ArmABI -> ArmABI -> Bool #

Read ArmABI # 
Instance details

Defined in GHC.Platform

Show ArmABI # 
Instance details

Defined in GHC.Platform

data PPC_64ABI Source #

PowerPC 64-bit ABI

Constructors

ELF_V1 
ELF_V2 

Instances

Instances details
Eq PPC_64ABI # 
Instance details

Defined in GHC.Platform

Read PPC_64ABI # 
Instance details

Defined in GHC.Platform

Show PPC_64ABI # 
Instance details

Defined in GHC.Platform

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

Enum ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Eq ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Ord ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Read ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Show ByteOrder

Since: base-4.11.0.0

Instance details

Defined in GHC.ByteOrder

Generic ByteOrder

Since: base-4.15.0.0

Instance details

Defined in GHC.ByteOrder

Associated Types

type Rep ByteOrder :: Type -> Type Source #

type Rep ByteOrder 
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.

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.

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

stringEncodeArch :: Arch -> String Source #

See Note [Platform Syntax].

stringEncodeOS :: OS -> String Source #

See Note [Platform Syntax].

data SseVersion Source #

x86 SSE instructions

Constructors

SSE1 
SSE2 
SSE3 
SSE4 
SSE42 

Instances

Instances details
Eq SseVersion # 
Instance details

Defined in GHC.Platform

Ord SseVersion # 
Instance details

Defined in GHC.Platform

data BmiVersion Source #

x86 BMI (bit manipulation) instructions

Constructors

BMI1 
BMI2 

Instances

Instances details
Eq BmiVersion # 
Instance details

Defined in GHC.Platform

Ord BmiVersion # 
Instance details

Defined in GHC.Platform