Platform

ghc-8.4.1.20180329: The GHC API

Safe Haskell | Safe
Language | Haskell2010

Platform

Description

A description of the platform we're compiling for.

Synopsis

- data Platform = Platform {
  - platformArch :: Arch
  - platformOS :: OS
  - platformWordSize :: !Int
  - platformUnregisterised :: Bool
  - platformHasGnuNonexecStack :: Bool
  - platformHasIdentDirective :: Bool
  - platformHasSubsectionsViaSymbols :: Bool
  - platformIsCrossCompiling :: Bool
  }
- data Arch
  - = ArchUnknown
  - | ArchX86
  - | ArchX86_64
  - | ArchPPC
  - | ArchPPC_64 {
    - ppc_64ABI :: PPC_64ABI
    }
  - | ArchSPARC
  - | ArchSPARC64
  - | ArchARM {
    - armISA :: ArmISA
    - armISAExt :: [ArmISAExt]
    - armABI :: ArmABI
    }
  - | ArchARM64
  - | ArchAlpha
  - | ArchMipseb
  - | ArchMipsel
  - | ArchJavaScript
- data OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
  - | OSQNXNTO
  - | OSAIX
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- data PPC_64ABI
  - = ELF_V1
  - | ELF_V2
- target32Bit :: Platform -> Bool
- isARM :: Arch -> Bool
- osElfTarget :: OS -> Bool
- osMachOTarget :: OS -> Bool
- osSubsectionsViaSymbols :: OS -> Bool
- platformUsesFrameworks :: Platform -> Bool

# Documentation

data Platform Source #

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

Constructors

Platform |
Fields platformArch :: Arch platformOS :: OS platformWordSize :: !Int platformUnregisterised :: Bool platformHasGnuNonexecStack :: Bool platformHasIdentDirective :: Bool platformHasSubsectionsViaSymbols :: Bool platformIsCrossCompiling :: Bool

Instances

Eq Platform Source # |
Instance details Defined in Platform Methods (==) :: Platform -> Platform -> Bool # (/=) :: Platform -> Platform -> Bool #
Read Platform Source # |
Instance details Defined in 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 Platform Methods showsPrec :: Int -> Platform -> ShowS Source # show :: Platform -> String Source # showList :: [Platform] -> ShowS Source #

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.

Constructors

ArchUnknown |
ArchX86 |
ArchX86_64 |
ArchPPC |
ArchPPC_64 |
Fields ppc_64ABI :: PPC_64ABI
ArchSPARC |
ArchSPARC64 |
ArchARM |
Fields armISA :: ArmISA armISAExt :: [ArmISAExt] armABI :: ArmABI
ArchARM64 |
ArchAlpha |
ArchMipseb |
ArchMipsel |
ArchJavaScript |

Instances

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

data OS Source #

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

Constructors

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

Instances

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

data ArmISA Source #

ARM Instruction Set Architecture, Extensions and ABI

Constructors

ARMv5 |
ARMv6 |
ARMv7 |

Instances

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

data ArmISAExt Source #

Constructors

VFPv2 |
VFPv3 |
VFPv3D16 |
NEON |
IWMMX2 |

Instances

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

data ArmABI Source #

Constructors

SOFT |
SOFTFP |
HARD |

Instances

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

data PPC_64ABI Source #

PowerPC 64-bit ABI

Constructors

ELF_V1 |
ELF_V2 |

Instances

Eq PPC_64ABI Source # |
Instance details Defined in Platform Methods (==) :: PPC_64ABI -> PPC_64ABI -> Bool # (/=) :: PPC_64ABI -> PPC_64ABI -> Bool #
Read PPC_64ABI Source # |
Instance details Defined in Platform 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 Source # |
Instance details Defined in Platform Methods showsPrec :: Int -> PPC_64ABI -> ShowS Source # show :: PPC_64ABI -> String Source # showList :: [PPC_64ABI] -> ShowS Source #

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 #