Platform

ghc-7.10.3: 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
  - | ArchSPARC
  - | ArchARM {
    - armISA :: ArmISA
    - armISAExt :: [ArmISAExt]
    - armABI :: ArmABI
    }
  - | ArchARM64
  - | ArchAlpha
  - | ArchMipseb
  - | ArchMipsel
  - | ArchJavaScript
- data OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSiOS
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
  - | OSOsf3
  - | OSQNXNTO
  - | OSAndroid
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- target32Bit :: Platform -> Bool
- isARM :: Arch -> Bool
- osElfTarget :: OS -> Bool
- osMachOTarget :: OS -> Bool
- platformUsesFrameworks :: Platform -> Bool
- platformBinariesAreStaticLibs :: Platform -> Bool

# Documentation

data Platform

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 |
Read Platform |
Show Platform |

data Arch

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 |
ArchSPARC |
ArchARM |
Fields armISA :: ArmISA armISAExt :: [ArmISAExt] armABI :: ArmABI
ArchARM64 |
ArchAlpha |
ArchMipseb |
ArchMipsel |
ArchJavaScript |

Instances

Eq Arch |
Read Arch |
Show Arch |

data OS

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

Constructors

OSUnknown |
OSLinux |
OSDarwin |
OSiOS |
OSSolaris2 |
OSMinGW32 |
OSFreeBSD |
OSDragonFly |
OSOpenBSD |
OSNetBSD |
OSKFreeBSD |
OSHaiku |
OSOsf3 |
OSQNXNTO |
OSAndroid |

Instances

Eq OS |
Read OS |
Show OS |

data ArmISA

ARM Instruction Set Architecture, Extensions and ABI

Constructors

ARMv5 |
ARMv6 |
ARMv7 |

Instances

Eq ArmISA |
Read ArmISA |
Show ArmISA |

data ArmISAExt

Constructors

VFPv2 |
VFPv3 |
VFPv3D16 |
NEON |
IWMMX2 |

Instances

Eq ArmISAExt |
Read ArmISAExt |
Show ArmISAExt |

data ArmABI

Constructors

SOFT |
SOFTFP |
HARD |

Instances

Eq ArmABI |
Read ArmABI |
Show ArmABI |

target32Bit :: Platform -> Bool

isARM :: Arch -> Bool

osElfTarget :: OS -> Bool

This predicates 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.

platformUsesFrameworks :: Platform -> Bool

platformBinariesAreStaticLibs :: Platform -> Bool