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

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

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

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

Instance details

Defined in GHC.Platform.ArchOS

Methods

compare :: ArmISAExt -> ArmISAExt -> Ordering Source #

(<) :: ArmISAExt -> ArmISAExt -> Bool Source #

(<=) :: ArmISAExt -> ArmISAExt -> Bool Source #

(>) :: ArmISAExt -> ArmISAExt -> Bool Source #

(>=) :: ArmISAExt -> ArmISAExt -> Bool Source #

max :: ArmISAExt -> ArmISAExt -> ArmISAExt Source #

min :: ArmISAExt -> ArmISAExt -> ArmISAExt Source #

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

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

Instance details

Defined in GHC.Platform.ArchOS

Methods

compare :: PPC_64ABI -> PPC_64ABI -> Ordering Source #

(<) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

(<=) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

(>) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

(>=) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

max :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI Source #

min :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI Source #

isARM :: Arch -> Bool Source #

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

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].