Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module is about types that can be defined in Haskell, but which must be wired into the compiler nonetheless. C.f module GHC.Builtin.Types.Prim
Synopsis
- mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name
- mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name
- wiredInTyCons :: [TyCon]
- isBuiltInOcc_maybe :: OccName -> Maybe Name
- boolTy :: Type
- boolTyCon :: TyCon
- boolTyCon_RDR :: RdrName
- boolTyConName :: Name
- trueDataCon :: DataCon
- trueDataConId :: Id
- true_RDR :: RdrName
- falseDataCon :: DataCon
- falseDataConId :: Id
- false_RDR :: RdrName
- promotedFalseDataCon :: TyCon
- promotedTrueDataCon :: TyCon
- orderingTyCon :: TyCon
- ordLTDataCon :: DataCon
- ordLTDataConId :: Id
- ordEQDataCon :: DataCon
- ordEQDataConId :: Id
- ordGTDataCon :: DataCon
- ordGTDataConId :: Id
- promotedLTDataCon :: TyCon
- promotedEQDataCon :: TyCon
- promotedGTDataCon :: TyCon
- boxingDataCon_maybe :: TyCon -> Maybe DataCon
- charTyCon :: TyCon
- charDataCon :: DataCon
- charTyCon_RDR :: RdrName
- charTy :: Type
- stringTy :: Type
- charTyConName :: Name
- stringTyCon_RDR :: RdrName
- 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
- word8TyCon :: TyCon
- word8DataCon :: DataCon
- word8Ty :: Type
- listTyCon :: TyCon
- listTyCon_RDR :: RdrName
- listTyConName :: Name
- listTyConKey :: Unique
- nilDataCon :: DataCon
- nilDataConName :: Name
- nilDataConKey :: Unique
- consDataCon_RDR :: RdrName
- consDataCon :: DataCon
- consDataConName :: Name
- promotedNilDataCon :: TyCon
- promotedConsDataCon :: TyCon
- mkListTy :: Type -> Type
- mkPromotedListTy :: Kind -> [Type] -> Type
- maybeTyCon :: TyCon
- maybeTyConName :: Name
- nothingDataCon :: DataCon
- nothingDataConName :: Name
- promotedNothingDataCon :: TyCon
- justDataCon :: DataCon
- justDataConName :: Name
- promotedJustDataCon :: TyCon
- mkPromotedMaybeTy :: Kind -> Maybe Type -> Type
- mkMaybeTy :: Type -> Kind
- isPromotedMaybeTy :: Type -> Maybe (Maybe Type)
- mkTupleTy :: Boxity -> [Type] -> Type
- mkTupleTy1 :: Boxity -> [Type] -> Type
- mkBoxedTupleTy :: [Type] -> Type
- mkTupleStr :: Boxity -> Arity -> String
- tupleTyCon :: Boxity -> Arity -> TyCon
- tupleDataCon :: Boxity -> Arity -> DataCon
- tupleTyConName :: TupleSort -> Arity -> Name
- tupleDataConName :: Boxity -> Arity -> Name
- promotedTupleDataCon :: Boxity -> Arity -> TyCon
- unitTyCon :: TyCon
- unitDataCon :: DataCon
- unitDataConId :: Id
- unitTy :: Type
- unitTyConKey :: Unique
- pairTyCon :: TyCon
- mkPromotedPairTy :: Kind -> Kind -> Type -> Type -> Type
- isPromotedPairType :: Type -> Maybe (Type, Type)
- unboxedUnitTy :: Type
- unboxedUnitTyCon :: TyCon
- unboxedUnitDataCon :: DataCon
- unboxedTupleKind :: [Type] -> Kind
- unboxedSumKind :: [Type] -> Kind
- filterCTuple :: RdrName -> RdrName
- cTupleTyCon :: Arity -> TyCon
- cTupleTyConName :: Arity -> Name
- cTupleTyConNames :: [Name]
- isCTupleTyConName :: Name -> Bool
- cTupleTyConNameArity_maybe :: Name -> Maybe Arity
- cTupleDataCon :: Arity -> DataCon
- cTupleDataConName :: Arity -> Name
- cTupleDataConNames :: [Name]
- cTupleSelId :: ConTag -> Arity -> Id
- cTupleSelIdName :: ConTag -> Arity -> Name
- anyTyCon :: TyCon
- anyTy :: Type
- anyTypeOfKind :: Kind -> Type
- makeRecoveryTyCon :: TyCon -> TyCon
- mkSumTy :: [Type] -> Type
- sumTyCon :: Arity -> TyCon
- sumDataCon :: ConTag -> Arity -> DataCon
- typeSymbolKindCon :: TyCon
- typeSymbolKind :: Kind
- isLiftedTypeKindTyConName :: Name -> Bool
- typeToTypeKind :: Kind
- liftedRepTyCon :: TyCon
- unliftedRepTyCon :: TyCon
- constraintKind :: Kind
- liftedTypeKind :: Kind
- unliftedTypeKind :: Kind
- constraintKindTyCon :: TyCon
- liftedTypeKindTyCon :: TyCon
- unliftedTypeKindTyCon :: TyCon
- constraintKindTyConName :: Name
- liftedTypeKindTyConName :: Name
- unliftedTypeKindTyConName :: Name
- liftedRepTyConName :: Name
- unliftedRepTyConName :: Name
- heqTyCon :: TyCon
- heqTyConName :: Name
- heqClass :: Class
- heqDataCon :: DataCon
- eqTyCon :: TyCon
- eqTyConName :: Name
- eqClass :: Class
- eqDataCon :: DataCon
- eqTyCon_RDR :: RdrName
- coercibleTyCon :: TyCon
- coercibleTyConName :: Name
- coercibleDataCon :: DataCon
- coercibleClass :: Class
- runtimeRepTyCon :: TyCon
- levityTyCon :: TyCon
- vecCountTyCon :: TyCon
- vecElemTyCon :: TyCon
- boxedRepDataConTyCon :: TyCon
- runtimeRepTy :: Type
- liftedRepTy :: Type
- unliftedRepTy :: Type
- vecRepDataConTyCon :: TyCon
- tupleRepDataConTyCon :: TyCon
- sumRepDataConTyCon :: TyCon
- liftedDataConTyCon :: TyCon
- unliftedDataConTyCon :: TyCon
- liftedDataConTy :: Type
- unliftedDataConTy :: Type
- intRepDataConTy :: Type
- int8RepDataConTy :: Type
- int16RepDataConTy :: Type
- int32RepDataConTy :: Type
- int64RepDataConTy :: Type
- wordRepDataConTy :: Type
- word8RepDataConTy :: Type
- word16RepDataConTy :: Type
- word32RepDataConTy :: Type
- word64RepDataConTy :: Type
- addrRepDataConTy :: Type
- floatRepDataConTy :: Type
- doubleRepDataConTy :: Type
- vec2DataConTy :: Type
- vec4DataConTy :: Type
- vec8DataConTy :: Type
- vec16DataConTy :: Type
- vec32DataConTy :: Type
- vec64DataConTy :: Type
- int8ElemRepDataConTy :: Type
- int16ElemRepDataConTy :: Type
- int32ElemRepDataConTy :: Type
- int64ElemRepDataConTy :: Type
- word8ElemRepDataConTy :: Type
- word16ElemRepDataConTy :: Type
- word32ElemRepDataConTy :: Type
- word64ElemRepDataConTy :: Type
- floatElemRepDataConTy :: Type
- doubleElemRepDataConTy :: Type
- multiplicityTyConName :: Name
- oneDataConName :: Name
- manyDataConName :: Name
- multiplicityTy :: Type
- multiplicityTyCon :: TyCon
- oneDataCon :: DataCon
- manyDataCon :: DataCon
- oneDataConTy :: Type
- manyDataConTy :: Type
- oneDataConTyCon :: TyCon
- manyDataConTyCon :: TyCon
- multMulTyCon :: TyCon
- unrestrictedFunTyCon :: TyCon
- unrestrictedFunTyConName :: Name
- integerTy :: Type
- integerTyCon :: TyCon
- integerTyConName :: Name
- integerISDataCon :: DataCon
- integerISDataConName :: Name
- integerIPDataCon :: DataCon
- integerIPDataConName :: Name
- integerINDataCon :: DataCon
- integerINDataConName :: Name
- naturalTy :: Type
- naturalTyCon :: TyCon
- naturalTyConName :: Name
- naturalNSDataCon :: DataCon
- naturalNSDataConName :: Name
- naturalNBDataCon :: DataCon
- naturalNBDataConName :: Name
Helper functions defined here
mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name Source #
mkWiredInIdName :: Module -> FastString -> Unique -> Id -> Name Source #
All wired in things
wiredInTyCons :: [TyCon] Source #
isBuiltInOcc_maybe :: OccName -> Maybe Name Source #
Built-in syntax isn't "in scope" so these OccNames map to wired-in Names with BuiltInSyntax. However, this should only be necessary while resolving names produced by Template Haskell splices since we take care to encode built-in syntax names specially in interface files. See Note [Symbol table representation of names].
Moreover, there is no need to include names of things that the user can't write (e.g. type representation bindings like $tc(,,,)).
Bool
boolTyConName :: Name Source #
trueDataConId :: Id Source #
falseDataConId :: Id Source #
Ordering
ordLTDataConId :: Id Source #
ordEQDataConId :: Id Source #
ordGTDataConId :: Id Source #
Boxing primitive types
Char
charTyConName :: Name Source #
Double
doubleTyCon :: TyCon Source #
Float
floatTyCon :: TyCon Source #
Int
intDataCon :: DataCon Source #
intTyConName :: Name Source #
Word
wordTyConName :: Name Source #
Word8
word8TyCon :: TyCon Source #
List
listTyConName :: Name Source #
nilDataCon :: DataCon Source #
Make a *promoted* list.
Maybe
maybeTyCon :: TyCon Source #
Tuples
mkTupleTy :: Boxity -> [Type] -> Type Source #
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are flattened. See Note [One-tuples]
mkTupleTy1 :: Boxity -> [Type] -> Type Source #
Make a tuple type. The list of types should not include any RuntimeRep specifications. Boxed 1-tuples are *not* flattened. See Note [One-tuples] and Note [Don't flatten tuples from HsSyn] in GHC.Core.Make
mkBoxedTupleTy :: [Type] -> Type Source #
Build the type of a small tuple that holds the specified type of thing Flattens 1-tuples. See Note [One-tuples].
unitDataConId :: Id Source #
unboxedUnitTy :: Type Source #
unboxedTupleKind :: [Type] -> Kind Source #
Specialization of unboxedTupleSumKind
for tuples
unboxedSumKind :: [Type] -> Kind Source #
Specialization of unboxedTupleSumKind
for sums
filterCTuple :: RdrName -> RdrName Source #
Replaces constraint tuple names with corresponding boxed ones.
Constraint tuples
cTupleTyCon :: Arity -> TyCon Source #
cTupleTyConName :: Arity -> Name Source #
cTupleTyConNames :: [Name] Source #
isCTupleTyConName :: Name -> Bool Source #
cTupleTyConNameArity_maybe :: Name -> Maybe Arity Source #
If the given name is that of a constraint tuple, return its arity.
cTupleDataCon :: Arity -> DataCon Source #
cTupleDataConName :: Arity -> Name Source #
cTupleDataConNames :: [Name] Source #
Any
anyTypeOfKind :: Kind -> Type Source #
Recovery TyCon
makeRecoveryTyCon :: TyCon -> TyCon Source #
Make a fake, recovery TyCon
from an existing one.
Used when recovering from errors in type declarations
Sums
sumDataCon :: ConTag -> Arity -> DataCon Source #
Data constructor for i-th alternative of a n-ary unboxed sum.
Kinds
isLiftedTypeKindTyConName :: Name -> Bool Source #
liftedRepTyCon :: TyCon Source #
type LiftedRep = 'BoxedRep 'Lifted
unliftedRepTyCon :: TyCon Source #
type UnliftedRep = 'BoxedRep 'Unlifted
unliftedTypeKindTyCon :: TyCon Source #
type UnliftedType = TYPE ('BoxedRep 'Unlifted)
Equality predicates
heqTyConName :: Name Source #
heqDataCon :: DataCon Source #
eqTyConName :: Name Source #
RuntimeRep and friends
levityTyCon :: TyCon Source #
vecElemTyCon :: TyCon Source #
runtimeRepTy :: Type Source #
liftedRepTy :: Type Source #
unliftedRepTy :: Type Source #
vec2DataConTy :: Type Source #
vec4DataConTy :: Type Source #
vec8DataConTy :: Type Source #
Multiplicity and friends
oneDataCon :: DataCon Source #
oneDataConTy :: Type Source #
manyDataConTy :: Type Source #
multMulTyCon :: TyCon Source #
Bignum
integerTyCon :: TyCon Source #
naturalTyCon :: TyCon Source #