ghc-7.8.4: The GHC API

Safe HaskellNone
LanguageHaskell98

TysWiredIn

Contents

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

All wired in things

Bool

Ordering

Char

Double

Float

Int

Word

List

Tuples

mkBoxedTupleTy :: [Type] -> Type Source

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

Unit

Kinds

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

Equality predicates