GHC.Platform.ArchOS

ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

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
- isPPC :: 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 #

Platform architecture and OS.

Constructors

ArchOS |
Fields archOS_arch :: Arch archOS_OS :: OS

#### Instances

Instances details

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

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 # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS Arch # readList :: ReadS [Arch] # readPrec :: ReadPrec Arch # readListPrec :: ReadPrec [Arch] #
Show Arch # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> Arch -> ShowS # show :: Arch -> String # showList :: [Arch] -> ShowS #
Eq Arch # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: Arch -> Arch -> Bool # (/=) :: Arch -> Arch -> Bool #
Ord Arch # |
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 #

ARM Instruction Set Architecture

Constructors

ARMv5 |
ARMv6 |
ARMv7 |

#### Instances

Instances details

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

ARM extensions

Constructors

VFPv2 |
VFPv3 |
VFPv3D16 |
NEON |
IWMMX2 |

#### Instances

Instances details

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

ARM ABI

Constructors

SOFT |
SOFTFP |
HARD |

#### Instances

Instances details

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

PowerPC 64-bit ABI

Constructors

ELF_V1 | PowerPC64
ELF_V2 | PowerPC64 LE

#### Instances

Instances details

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

isPPC :: Arch -> Bool #

stringEncodeArch :: Arch -> String #

See Note [Platform Syntax].

# Operating systems

data OS #

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 # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS OS # readList :: ReadS [OS] # readPrec :: ReadPrec OS # readListPrec :: ReadPrec [OS] #
Show OS # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> OS -> ShowS # show :: OS -> String # showList :: [OS] -> ShowS #
Eq OS # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: OS -> OS -> Bool # (/=) :: OS -> OS -> Bool #
Ord OS # |
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 #

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

osMachOTarget :: OS -> Bool #

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

stringEncodeOS :: OS -> String #

See Note [Platform Syntax].