ghc-7.6.3: The GHC API

Safe Haskell | Safe-Inferred

Platform

Description

A description of the platform we're compiling for.

Synopsis

- data Platform = Platform {
  - platformArch :: Arch
  - platformOS :: OS
  - platformWordSize :: !Int
  - platformHasGnuNonexecStack :: Bool
  - platformHasIdentDirective :: Bool
  - platformHasSubsectionsViaSymbols :: Bool
  }
- data Arch
  - = ArchUnknown
  - | ArchX86
  - | ArchX86_64
  - | ArchPPC
  - | ArchPPC_64
  - | ArchSPARC
  - | ArchARM {
    - armISA :: ArmISA
    - armISAExt :: [ArmISAExt]
    - armABI :: ArmABI
    }
- data OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- target32Bit :: Platform -> Bool
- osElfTarget :: OS -> 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 platformHasGnuNonexecStack :: Bool platformHasIdentDirective :: Bool platformHasSubsectionsViaSymbols :: 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

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 |
OSSolaris2 |
OSMinGW32 |
OSFreeBSD |
OSDragonFly |
OSOpenBSD |
OSNetBSD |
OSKFreeBSD |
OSHaiku |

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

osElfTarget :: OS -> Bool

This predicates tells us whether the OS supports ELF-like shared libraries.