ghc-7.0.4: The GHC API

BuildTyCl

Synopsis

- buildSynTyCon :: Name -> [TyVar] -> SynTyConRhs -> Kind -> TyConParent -> Maybe (TyCon, [Type]) -> TcRnIf m n TyCon
- buildAlgTyCon :: Name -> [TyVar] -> ThetaType -> AlgTyConRhs -> RecFlag -> Bool -> Bool -> TyConParent -> Maybe (TyCon, [Type]) -> TcRnIf m n 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] -> [TyThing] -> [TcMethInfo] -> RecFlag -> TcRnIf m n Class
- mkAbstractTyConRhs :: AlgTyConRhs
- mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs
- mkDataTyConRhs :: [DataCon] -> AlgTyConRhs

# Documentation

buildSynTyConSource

Arguments

:: Name |
-> [TyVar] |
-> SynTyConRhs |
-> Kind | Kind of the RHS
-> TyConParent |
-> Maybe (TyCon, [Type]) | family instance if applicable
-> TcRnIf m n TyCon |

buildAlgTyConSource

Arguments

:: Name |
-> [TyVar] |
-> ThetaType | Stupid theta
-> AlgTyConRhs |
-> RecFlag |
-> Bool | True = want generics functions
-> Bool | True = was declared in GADT syntax
-> TyConParent |
-> Maybe (TyCon, [Type]) | family instance if applicable
-> TcRnIf m n TyCon |

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

type TcMethInfo = (Name, DefMethSpec, Type)Source

buildClass :: Bool -> Name -> [TyVar] -> ThetaType -> [FunDep TyVar] -> [TyThing] -> [TcMethInfo] -> RecFlag -> TcRnIf m n Class Source

mkAbstractTyConRhs :: AlgTyConRhs Source

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

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 Source