ghc-boot-9.6.3: Shared functionality between GHC and its boot libraries

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Platform.ArchOS

Description

Platform architecture and OS

We need it in ghc-boot because ghc-pkg needs it.

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 OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
  - | OSQNXNTO
  - | OSAIX
  - | OSHurd
  - | OSWasi
  - | OSGhcjs
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- data PPC_64ABI
  - = ELF_V1
  - | ELF_V2
- stringEncodeArch :: Arch -> String
- 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 # (/=) :: 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 #

data Arch Source #

Architectures

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 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 # (/=) :: 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 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 # (/=) :: 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 #

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 # (/=) :: 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 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 # (/=) :: 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 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 # (/=) :: 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 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 # (/=) :: 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 #

stringEncodeArch :: Arch -> String Source #

See Note [Platform Syntax].

stringEncodeOS :: OS -> String Source #

See Note [Platform Syntax].