ghc-lib-parser-9.8.5.20250214: The GHC API, decoupled from GHC versions
Safe HaskellIgnore
LanguageHaskell2010

GHC.Platform

Description

Platform description

Synopsis

Documentation

data Platform Source #

Platform description

This is used to describe platforms so that we can generate code for them.

Constructors

Platform 

Fields

Instances

Instances details
Read Platform Source # 
Instance details

Defined in GHC.Platform

Show Platform Source # 
Instance details

Defined in GHC.Platform

Eq Platform Source # 
Instance details

Defined in GHC.Platform

Ord Platform Source # 
Instance details

Defined in GHC.Platform

OutputableP Platform CmmGraph Source # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> CmmGraph -> SDoc Source #

OutputableP Platform CmmInfoTable Source # 
Instance details

Defined in GHC.Cmm

OutputableP Platform CmmStatic Source # 
Instance details

Defined in GHC.Cmm

OutputableP Platform CmmTopInfo Source # 
Instance details

Defined in GHC.Cmm

OutputableP Platform CLabel Source # 
Instance details

Defined in GHC.Cmm.CLabel

Methods

pdoc :: Platform -> CLabel -> SDoc Source #

OutputableP Platform InfoProvEnt Source # 
Instance details

Defined in GHC.Cmm.CLabel

OutputableP Platform CmmExpr Source # 
Instance details

Defined in GHC.Cmm.Expr

Methods

pdoc :: Platform -> CmmExpr -> SDoc Source #

OutputableP Platform CmmLit Source # 
Instance details

Defined in GHC.Cmm.Expr

Methods

pdoc :: Platform -> CmmLit -> SDoc Source #

OutputableP Platform ForeignTarget Source # 
Instance details

Defined in GHC.Cmm.Node

OutputableP Platform (GenCmmStatics a) Source # 
Instance details

Defined in GHC.Cmm

OutputableP Platform (CmmNode e x) Source # 
Instance details

Defined in GHC.Cmm.Node

Methods

pdoc :: Platform -> CmmNode e x -> SDoc Source #

(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) Source # 
Instance details

Defined in GHC.Cmm

Methods

pdoc :: Platform -> GenCmmDecl d info i -> SDoc Source #

OutputableP Platform (Block CmmNode C C) Source # 
Instance details

Defined in GHC.Cmm.Node

OutputableP Platform (Block CmmNode C O) Source # 
Instance details

Defined in GHC.Cmm.Node

OutputableP Platform (Block CmmNode O C) Source # 
Instance details

Defined in GHC.Cmm.Node

OutputableP Platform (Block CmmNode O O) Source # 
Instance details

Defined in GHC.Cmm.Node

OutputableP Platform (Graph CmmNode e x) Source # 
Instance details

Defined in GHC.Cmm.Node

Methods

pdoc :: Platform -> Graph CmmNode e x -> SDoc Source #

platformArch :: Platform -> Arch Source #

Platform architecture

platformOS :: Platform -> OS Source #

Platform OS

data ArchOS Source #

Platform architecture and OS.

Constructors

ArchOS 

Fields

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

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

data Arch Source #

Architectures

TODO: It might be nice to extend these constructors with information about what instruction set extensions an architecture might support.

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 OS Source #

Operating systems.

Using OSUnknown to generate code should produce a sensible default, but no promises.

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 #

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

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

data ArmISAExt Source #

ARM extensions

Constructors

VFPv2 
VFPv3 
VFPv3D16 
NEON 
IWMMX2 

Instances

Instances details
Read ArmISAExt Source # 
Instance details

Defined in GHC.Platform.ArchOS

Show ArmISAExt Source # 
Instance details

Defined in GHC.Platform.ArchOS

Eq ArmISAExt Source # 
Instance details

Defined in GHC.Platform.ArchOS

Ord ArmISAExt Source # 
Instance details

Defined in GHC.Platform.ArchOS

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

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

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

Show PPC_64ABI Source # 
Instance details

Defined in GHC.Platform.ArchOS

Eq PPC_64ABI Source # 
Instance details

Defined in GHC.Platform.ArchOS

Ord PPC_64ABI Source # 
Instance details

Defined in GHC.Platform.ArchOS

data ByteOrder #

Constructors

BigEndian 
LittleEndian 

Instances

Instances details
Bounded ByteOrder 
Instance details

Defined in GHC.ByteOrder

Enum ByteOrder 
Instance details

Defined in GHC.ByteOrder

Generic ByteOrder 
Instance details

Defined in GHC.ByteOrder

Associated Types

type Rep ByteOrder 
Instance details

Defined in GHC.ByteOrder

type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.ByteOrder" "base" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: ByteOrder -> Rep ByteOrder x

to :: Rep ByteOrder x -> ByteOrder

Read ByteOrder 
Instance details

Defined in GHC.ByteOrder

Show ByteOrder 
Instance details

Defined in GHC.ByteOrder

Eq ByteOrder 
Instance details

Defined in GHC.ByteOrder

Ord ByteOrder 
Instance details

Defined in GHC.ByteOrder

type Rep ByteOrder 
Instance details

Defined in GHC.ByteOrder

type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.ByteOrder" "base" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

target32Bit :: Platform -> Bool Source #

This predicate tells us whether the platform is 32-bit.

osElfTarget :: OS -> Bool Source #

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

osMachOTarget :: OS -> Bool Source #

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

platformMinInt :: Platform -> Integer Source #

Minimum representable Int value for the given platform

platformMaxInt :: Platform -> Integer Source #

Maximum representable Int value for the given platform

platformMaxWord :: Platform -> Integer Source #

Maximum representable Word value for the given platform

platformInIntRange :: Platform -> Integer -> Bool Source #

Test if the given Integer is representable with a platform Int

platformInWordRange :: Platform -> Integer -> Bool Source #

Test if the given Integer is representable with a platform Word

platformCConvNeedsExtension :: Platform -> Bool Source #

For some architectures the C calling convention is that any integer shorter than 64 bits is replaced by its 64 bits representation using sign or zero extension.

platformHasRTSLinker :: Platform -> Bool Source #

Does this platform have an RTS linker?

data PlatformMisc Source #

Platform-specific settings formerly hard-coded in Config.hs.

These should probably be all be triaged whether they can be computed from other settings or belong in another another place (like Platform above).

data SseVersion Source #

x86 SSE instructions

Constructors

SSE1 
SSE2 
SSE3 
SSE4 
SSE42 

data BmiVersion Source #

x86 BMI (bit manipulation) instructions

Constructors

BMI1 
BMI2 

SSE and AVX

Platform constants

data PlatformConstants Source #

Constructors

PlatformConstants 

Fields

lookupPlatformConstants :: [FilePath] -> IO (Maybe PlatformConstants) Source #

Try to locate "GhclibDerivedConstants.h" file in the given dirs and to parse the PlatformConstants from it.

See Note [Platform constants]

Shared libraries