ghc-7.0.4: The GHC API

TysWiredIn

Contents

- All wired in things
- Bool
- Char
- Double
- Float
- Int
- Word
- List
- Tuples
- Unit
- Parallel arrays

Description

This module is about types that can be defined in Haskell, but which must be wired into the compiler nonetheless. C.f module TysPrim

Synopsis

- wiredInTyCons :: [TyCon]
- boolTy :: Type
- boolTyCon :: TyCon
- boolTyCon_RDR :: RdrName
- boolTyConName :: Name
- trueDataCon :: DataCon
- trueDataConId :: Id
- true_RDR :: RdrName
- falseDataCon :: DataCon
- falseDataConId :: Id
- false_RDR :: RdrName
- charTyCon :: TyCon
- charDataCon :: DataCon
- charTyCon_RDR :: RdrName
- charTy :: Type
- stringTy :: Type
- charTyConName :: Name
- doubleTyCon :: TyCon
- doubleDataCon :: DataCon
- doubleTy :: Type
- doubleTyConName :: Name
- floatTyCon :: TyCon
- floatDataCon :: DataCon
- floatTy :: Type
- floatTyConName :: Name
- intTyCon :: TyCon
- intDataCon :: DataCon
- intTyCon_RDR :: RdrName
- intDataCon_RDR :: RdrName
- intTyConName :: Name
- intTy :: Type
- wordTyCon :: TyCon
- wordDataCon :: DataCon
- wordTyConName :: Name
- wordTy :: Type
- listTyCon :: TyCon
- nilDataCon :: DataCon
- consDataCon :: DataCon
- listTyCon_RDR :: RdrName
- consDataCon_RDR :: RdrName
- listTyConName :: Name
- mkListTy :: Type -> Type
- mkTupleTy :: Boxity -> [Type] -> Type
- mkBoxedTupleTy :: [Type] -> Type
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleCon :: Boxity -> Arity -> DataCon
- unitTyCon :: TyCon
- unitDataCon :: DataCon
- unitDataConId :: Id
- pairTyCon :: TyCon
- unboxedSingletonTyCon :: TyCon
- unboxedSingletonDataCon :: DataCon
- unboxedPairTyCon :: TyCon
- unboxedPairDataCon :: DataCon
- unitTy :: Type
- mkPArrTy :: Type -> Type
- parrTyCon :: TyCon
- parrFakeCon :: Arity -> DataCon
- isPArrTyCon :: TyCon -> Bool
- isPArrFakeCon :: DataCon -> Bool
- parrTyCon_RDR :: RdrName
- parrTyConName :: Name

# All wired in things

wiredInTyCons :: [TyCon]Source

# Bool

boolTy :: Type Source

boolTyCon :: TyCon Source

boolTyCon_RDR :: RdrName Source

boolTyConName :: Name Source

trueDataCon :: DataCon Source

trueDataConId :: Id Source

true_RDR :: RdrName Source

falseDataCon :: DataCon Source

falseDataConId :: Id Source

false_RDR :: RdrName Source

# Char

charTyCon :: TyCon Source

charDataCon :: DataCon Source

charTyCon_RDR :: RdrName Source

charTy :: Type Source

stringTy :: Type Source

charTyConName :: Name Source

# Double

doubleTyCon :: TyCon Source

doubleDataCon :: DataCon Source

doubleTy :: Type Source

doubleTyConName :: Name Source

# Float

floatTyCon :: TyCon Source

floatDataCon :: DataCon Source

floatTy :: Type Source

floatTyConName :: Name Source

# Int

intTyCon :: TyCon Source

intDataCon :: DataCon Source

intTyCon_RDR :: RdrName Source

intDataCon_RDR :: RdrName Source

intTyConName :: Name Source

intTy :: Type Source

# Word

wordTyCon :: TyCon Source

wordDataCon :: DataCon Source

wordTyConName :: Name Source

wordTy :: Type Source

# List

listTyCon :: TyCon Source

nilDataCon :: DataCon Source

consDataCon :: DataCon Source

listTyCon_RDR :: RdrName Source

consDataCon_RDR :: RdrName Source

listTyConName :: Name Source

mkListTy :: Type -> Type Source

# Tuples

mkTupleTy :: Boxity -> [Type] -> Type Source

mkBoxedTupleTy :: [Type] -> Type Source

Build the type of a small tuple that holds the specified type of thing

tupleTyCon :: Boxity -> Arity -> TyCon Source

tupleCon :: Boxity -> Arity -> DataCon Source

unitTyCon :: TyCon Source

unitDataCon :: DataCon Source

unitDataConId :: Id Source

pairTyCon :: TyCon Source

unboxedSingletonTyCon :: TyCon Source

unboxedSingletonDataCon :: DataCon Source

unboxedPairTyCon :: TyCon Source

unboxedPairDataCon :: DataCon Source

# Unit

unitTy :: Type Source

# Parallel arrays

mkPArrTy :: Type -> Type Source

Construct a type representing the application of the parallel array constructor

parrTyCon :: TyCon Source

Represents the type constructor of parallel arrays

- This must match the definition in `PrelPArr`

NB: Although the constructor is given here, it will not be accessible in user code as it is not in the environment of any compiled module except `PrelPArr`.

parrFakeCon :: Arity -> DataCon Source

Fake array constructors

- These constructors are never really used to represent array values; however, they are very convenient during desugaring (and, in particular, in the pattern matching compiler) to treat array pattern just like yet another constructor pattern

isPArrTyCon :: TyCon -> Bool Source

Check whether a type constructor is the constructor for parallel arrays

isPArrFakeCon :: DataCon -> Bool Source

Checks whether a data constructor is a fake constructor for parallel arrays

parrTyCon_RDR :: RdrName Source

parrTyConName :: Name Source