GHC.Platform.ArchOS

ghc-platform-0.1.0.0: Platform information used by GHC and friends

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Platform.ArchOS

Contents

- Architectures
- Operating systems

Description

Platform architecture and OS

Synopsis

- data ArchOS = ArchOS {
  - archOS_arch :: Arch
  - archOS_OS :: OS
  }
- data Arch
  - = ArchUnknown
  - | ArchX86
  - | ArchX86_64
  - | ArchPPC
  - | ArchPPC_64 PPC_64ABI
  - | ArchS390X
  - | ArchARM ArmISA [ArmISAExt] ArmABI
  - | ArchAArch64
  - | ArchAlpha
  - | ArchMipseb
  - | ArchMipsel
  - | ArchRISCV64
  - | ArchLoongArch64
  - | ArchJavaScript
  - | ArchWasm32
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- data PPC_64ABI
  - = ELF_V1
  - | ELF_V2
- isARM :: Arch -> Bool
- stringEncodeArch :: Arch -> String
- data OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
  - | OSQNXNTO
  - | OSAIX
  - | OSHurd
  - | OSWasi
  - | OSGhcjs
- osElfTarget :: OS -> Bool
- osMachOTarget :: OS -> Bool
- stringEncodeOS :: OS -> String

# Documentation

data ArchOS Source #

Platform architecture and OS.

Constructors

ArchOS |
Fields archOS_arch :: Arch archOS_OS :: OS

#### Instances

Instances details

Read ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArchOS # readList :: ReadS [ArchOS] # readPrec :: ReadPrec ArchOS # readListPrec :: ReadPrec [ArchOS] #
Show ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArchOS -> ShowS # show :: ArchOS -> String # showList :: [ArchOS] -> ShowS #
Eq ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArchOS -> ArchOS -> Bool # (/=) :: ArchOS -> ArchOS -> Bool #
Ord ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArchOS -> ArchOS -> Ordering # (<) :: ArchOS -> ArchOS -> Bool # (<=) :: ArchOS -> ArchOS -> Bool # (>) :: ArchOS -> ArchOS -> Bool # (>=) :: ArchOS -> ArchOS -> Bool # max :: ArchOS -> ArchOS -> ArchOS # min :: ArchOS -> ArchOS -> ArchOS #

# Architectures

data Arch Source #

Architectures

Constructors

ArchUnknown |
ArchX86 |
ArchX86_64 |
ArchPPC |
ArchPPC_64 PPC_64ABI |
ArchS390X |
ArchARM ArmISA [ArmISAExt] ArmABI |
ArchAArch64 |
ArchAlpha |
ArchMipseb |
ArchMipsel |
ArchRISCV64 |
ArchLoongArch64 |
ArchJavaScript |
ArchWasm32 |

#### Instances

Instances details

Read Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS Arch # readList :: ReadS [Arch] # readPrec :: ReadPrec Arch # readListPrec :: ReadPrec [Arch] #
Show Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> Arch -> ShowS # show :: Arch -> String # showList :: [Arch] -> ShowS #
Eq Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: Arch -> Arch -> Bool # (/=) :: Arch -> Arch -> Bool #
Ord Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: Arch -> Arch -> Ordering # (<) :: Arch -> Arch -> Bool # (<=) :: Arch -> Arch -> Bool # (>) :: Arch -> Arch -> Bool # (>=) :: Arch -> Arch -> Bool # max :: Arch -> Arch -> Arch # min :: Arch -> Arch -> Arch #

data ArmISA Source #

ARM Instruction Set Architecture

Constructors

ARMv5 |
ARMv6 |
ARMv7 |

#### Instances

Instances details

Read ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmISA # readList :: ReadS [ArmISA] # readPrec :: ReadPrec ArmISA # readListPrec :: ReadPrec [ArmISA] #
Show ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISA -> ShowS # show :: ArmISA -> String # showList :: [ArmISA] -> ShowS #
Eq ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmISA -> ArmISA -> Bool # (/=) :: ArmISA -> ArmISA -> Bool #
Ord ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmISA -> ArmISA -> Ordering # (<) :: ArmISA -> ArmISA -> Bool # (<=) :: ArmISA -> ArmISA -> Bool # (>) :: ArmISA -> ArmISA -> Bool # (>=) :: ArmISA -> ArmISA -> Bool # max :: ArmISA -> ArmISA -> ArmISA # min :: ArmISA -> ArmISA -> ArmISA #

data ArmISAExt Source #

ARM extensions

Constructors

VFPv2 |
VFPv3 |
VFPv3D16 |
NEON |
IWMMX2 |

#### Instances

Instances details

Read ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmISAExt # readList :: ReadS [ArmISAExt] # readPrec :: ReadPrec ArmISAExt # readListPrec :: ReadPrec [ArmISAExt] #
Show ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISAExt -> ShowS # show :: ArmISAExt -> String # showList :: [ArmISAExt] -> ShowS #
Eq ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmISAExt -> ArmISAExt -> Bool # (/=) :: ArmISAExt -> ArmISAExt -> Bool #
Ord ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmISAExt -> ArmISAExt -> Ordering # (<) :: ArmISAExt -> ArmISAExt -> Bool # (<=) :: ArmISAExt -> ArmISAExt -> Bool # (>) :: ArmISAExt -> ArmISAExt -> Bool # (>=) :: ArmISAExt -> ArmISAExt -> Bool # max :: ArmISAExt -> ArmISAExt -> ArmISAExt # min :: ArmISAExt -> ArmISAExt -> ArmISAExt #

data ArmABI Source #

ARM ABI

Constructors

SOFT |
SOFTFP |
HARD |

#### Instances

Instances details

Read ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmABI # readList :: ReadS [ArmABI] # readPrec :: ReadPrec ArmABI # readListPrec :: ReadPrec [ArmABI] #
Show ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmABI -> ShowS # show :: ArmABI -> String # showList :: [ArmABI] -> ShowS #
Eq ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmABI -> ArmABI -> Bool # (/=) :: ArmABI -> ArmABI -> Bool #
Ord ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmABI -> ArmABI -> Ordering # (<) :: ArmABI -> ArmABI -> Bool # (<=) :: ArmABI -> ArmABI -> Bool # (>) :: ArmABI -> ArmABI -> Bool # (>=) :: ArmABI -> ArmABI -> Bool # max :: ArmABI -> ArmABI -> ArmABI # min :: ArmABI -> ArmABI -> ArmABI #

data PPC_64ABI Source #

PowerPC 64-bit ABI

Constructors

ELF_V1 | PowerPC64
ELF_V2 | PowerPC64 LE

#### Instances

Instances details

Read PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS PPC_64ABI # readList :: ReadS [PPC_64ABI] # readPrec :: ReadPrec PPC_64ABI # readListPrec :: ReadPrec [PPC_64ABI] #
Show PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> PPC_64ABI -> ShowS # show :: PPC_64ABI -> String # showList :: [PPC_64ABI] -> ShowS #
Eq PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: PPC_64ABI -> PPC_64ABI -> Bool # (/=) :: PPC_64ABI -> PPC_64ABI -> Bool #
Ord PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: PPC_64ABI -> PPC_64ABI -> Ordering # (<) :: PPC_64ABI -> PPC_64ABI -> Bool # (<=) :: PPC_64ABI -> PPC_64ABI -> Bool # (>) :: PPC_64ABI -> PPC_64ABI -> Bool # (>=) :: PPC_64ABI -> PPC_64ABI -> Bool # max :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI # min :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI #

isARM :: Arch -> Bool Source #

stringEncodeArch :: Arch -> String Source #

See Note [Platform Syntax].

# Operating systems

data OS Source #

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 |
OSWasi |
OSGhcjs |

#### Instances

Instances details

Read OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS OS # readList :: ReadS [OS] # readPrec :: ReadPrec OS # readListPrec :: ReadPrec [OS] #
Show OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> OS -> ShowS # show :: OS -> String # showList :: [OS] -> ShowS #
Eq OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: OS -> OS -> Bool # (/=) :: OS -> OS -> Bool #
Ord OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: OS -> OS -> Ordering # (<) :: OS -> OS -> Bool # (<=) :: OS -> OS -> Bool # (>) :: OS -> OS -> Bool # (>=) :: OS -> OS -> Bool # max :: OS -> OS -> OS # min :: OS -> OS -> OS #

osElfTarget :: OS -> Bool Source #

This predicate tells us whether the OS uses the ELF as its primary object format.

osMachOTarget :: OS -> Bool Source #

This predicate tells us whether the OS support Mach-O shared libraries.

stringEncodeOS :: OS -> String Source #

See Note [Platform Syntax].