BuildTyCl

ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

BuildTyCl

Synopsis

- buildSynonymTyCon :: Name -> [TyVar] -> [Role] -> Type -> Kind -> TcRnIf m n TyCon
- buildFamilyTyCon :: Name -> [TyVar] -> FamTyConFlav -> Kind -> TyConParent -> TcRnIf m n TyCon
- buildAlgTyCon :: Name -> [TyVar] -> [Role] -> Maybe CType -> ThetaType -> AlgTyConRhs -> RecFlag -> Bool -> Bool -> TyConParent -> TyCon
- buildDataCon :: FamInstEnvs -> Name -> Bool -> [HsBang] -> [Name] -> [TyVar] -> [TyVar] -> [(TyVar, Type)] -> ThetaType -> [Type] -> Type -> TyCon -> TcRnIf m n DataCon
- buildPatSyn :: Name -> Bool -> (Id, Bool) -> Maybe (Id, Bool) -> ([TyVar], ThetaType) -> ([TyVar], ThetaType) -> [Type] -> Type -> PatSyn
- type TcMethInfo = (Name, DefMethSpec, Type)
- buildClass :: Name -> [TyVar] -> [Role] -> ThetaType -> [FunDep TyVar] -> [ClassATItem] -> [TcMethInfo] -> ClassMinimalDef -> RecFlag -> TcRnIf m n Class
- distinctAbstractTyConRhs :: AlgTyConRhs
- totallyAbstractTyConRhs :: AlgTyConRhs
- mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs
- mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
- newImplicitBinder :: Name -> (OccName -> OccName) -> TcRnIf m n Name

# Documentation

buildSynonymTyCon

Arguments

:: Name |
-> [TyVar] |
-> [Role] |
-> Type |
-> Kind | Kind of the RHS
-> TcRnIf m n TyCon |

buildFamilyTyCon

Arguments

:: Name |
-> [TyVar] |
-> FamTyConFlav |
-> Kind | Kind of the RHS
-> TyConParent |
-> TcRnIf m n TyCon |

buildAlgTyCon

Arguments

:: Name |
-> [TyVar] | Kind variables and type variables
-> [Role] |
-> Maybe CType |
-> ThetaType | Stupid theta
-> AlgTyConRhs |
-> RecFlag |
-> Bool | True = this TyCon is promotable
-> Bool | True = was declared in GADT syntax
-> TyConParent |
-> TyCon |

buildDataCon :: FamInstEnvs -> Name -> Bool -> [HsBang] -> [Name] -> [TyVar] -> [TyVar] -> [(TyVar, Type)] -> ThetaType -> [Type] -> Type -> TyCon -> TcRnIf m n DataCon

buildPatSyn

Arguments

:: Name |
-> Bool |
-> (Id, Bool) |
-> Maybe (Id, Bool) |
-> ([TyVar], ThetaType) | Univ and req
-> ([TyVar], ThetaType) | Ex and prov
-> [Type] | Argument types
-> Type | Result type
-> PatSyn |

type TcMethInfo = (Name, DefMethSpec, Type)

buildClass :: Name -> [TyVar] -> [Role] -> ThetaType -> [FunDep TyVar] -> [ClassATItem] -> [TcMethInfo] -> ClassMinimalDef -> RecFlag -> TcRnIf m n Class

distinctAbstractTyConRhs :: AlgTyConRhs

totallyAbstractTyConRhs :: AlgTyConRhs

mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs

Monadic because it makes a Name for the coercion TyCon We pass the Name of the parent TyCon, as well as the TyCon itself, because the latter is part of a knot, whereas the former is not.

mkDataTyConRhs :: [DataCon] -> AlgTyConRhs

newImplicitBinder :: Name -> (OccName -> OccName) -> TcRnIf m n Name