ghc-7.6.3: The GHC API

Safe Haskell | None

BuildTyCl

Synopsis

- buildSynTyCon :: Name -> [TyVar] -> SynTyConRhs -> Kind -> TyConParent -> TcRnIf m n TyCon
- buildAlgTyCon :: Name -> [TyVar] -> Maybe CType -> ThetaType -> AlgTyConRhs -> RecFlag -> Bool -> TyConParent -> TyCon
- buildDataCon :: Name -> Bool -> [HsBang] -> [Name] -> [TyVar] -> [TyVar] -> [(TyVar, Type)] -> ThetaType -> [Type] -> Type -> TyCon -> TcRnIf m n DataCon
- type TcMethInfo = (Name, DefMethSpec, Type)
- buildClass :: Bool -> Name -> [TyVar] -> ThetaType -> [FunDep TyVar] -> [ClassATItem] -> [TcMethInfo] -> 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

buildSynTyCon

Arguments

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

buildAlgTyCon

Arguments

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

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

type TcMethInfo = (Name, DefMethSpec, Type)

buildClass :: Bool -> Name -> [TyVar] -> ThetaType -> [FunDep TyVar] -> [ClassATItem] -> [TcMethInfo] -> 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