ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

BuildTyCl

Synopsis

- buildDataCon :: FamInstEnvs -> Name -> Bool -> TyConRepName -> [HsSrcBang] -> Maybe [HsImplBang] -> [FieldLabel] -> [TyVar] -> [TyBinder] -> [TyVar] -> [TyBinder] -> [EqSpec] -> ThetaType -> [Type] -> Type -> TyCon -> TcRnIf m n DataCon
- buildPatSyn :: Name -> Bool -> (Id, Bool) -> Maybe (Id, Bool) -> ([TyVar], [TyBinder], ThetaType) -> ([TyVar], [TyBinder], ThetaType) -> [Type] -> Type -> [FieldLabel] -> PatSyn
- type TcMethInfo = (Name, Type, Maybe (DefMethSpec (SrcSpan, Type)))
- buildClass :: Name -> [TyVar] -> [Role] -> ThetaType -> [TyBinder] -> [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
- newTyConRepName :: Name -> TcRnIf gbl lcl TyConRepName

# Documentation

buildDataCon :: FamInstEnvs -> Name -> Bool -> TyConRepName -> [HsSrcBang] -> Maybe [HsImplBang] -> [FieldLabel] -> [TyVar] -> [TyBinder] -> [TyVar] -> [TyBinder] -> [EqSpec] -> ThetaType -> [Type] -> Type -> TyCon -> TcRnIf m n DataCon Source #

buildPatSyn Source #

Arguments

:: Name |
-> Bool |
-> (Id, Bool) |
-> Maybe (Id, Bool) |
-> ([TyVar], [TyBinder], ThetaType) | Univ and req
-> ([TyVar], [TyBinder], ThetaType) | Ex and prov
-> [Type] | Argument types
-> Type | Result type
-> [FieldLabel] | Field labels for a record pattern synonym
-> PatSyn |

type TcMethInfo = (Name, Type, Maybe (DefMethSpec (SrcSpan, Type))) Source #

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

distinctAbstractTyConRhs :: AlgTyConRhs Source #

totallyAbstractTyConRhs :: 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 #

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

newTyConRepName :: Name -> TcRnIf gbl lcl TyConRepName Source #

Make the `TyConRepName` for this `TyCon`