ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Tc.TyCl.Build

Synopsis

- buildDataCon :: FamInstEnvs -> DataConBangOpts -> Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyCoVar] -> [InvisTVBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied (Scaled Type)] -> KnotTied Type -> KnotTied TyCon -> NameEnv ConTag -> TcRnIf m n DataCon
- buildPatSyn :: Name -> Bool -> PatSynMatcher -> PatSynBuilder -> ([InvisTVBinder], ThetaType) -> ([InvisTVBinder], ThetaType) -> [FRRType] -> Type -> [FieldLabel] -> PatSyn
- type TcMethInfo = MethInfo
- type MethInfo = (Name, Type, Maybe (DefMethSpec (SrcSpan, Type)))
- buildClass :: Name -> [TyConBinder] -> [Role] -> [FunDep TyVar] -> Maybe (KnotTied ThetaType, [ClassATItem], [KnotTied MethInfo], ClassMinimalDef) -> TcRnIf m n Class
- mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs
- newImplicitBinder :: Name -> (OccName -> OccName) -> TcRnIf m n Name
- newTyConRepName :: Name -> TcRnIf gbl lcl TyConRepName

# Documentation

buildDataCon :: FamInstEnvs -> DataConBangOpts -> Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyCoVar] -> [InvisTVBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied (Scaled Type)] -> KnotTied Type -> KnotTied TyCon -> NameEnv ConTag -> TcRnIf m n DataCon Source #

buildPatSyn Source #

Arguments

:: Name |
-> Bool |
-> PatSynMatcher |
-> PatSynBuilder |
-> ([InvisTVBinder], ThetaType) | Univ and req
-> ([InvisTVBinder], ThetaType) | Ex and prov
-> [FRRType] | Argument types
-> Type | Result type
-> [FieldLabel] | Field labels for a record pattern synonym
-> PatSyn |

type TcMethInfo = MethInfo Source #

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

buildClass :: Name -> [TyConBinder] -> [Role] -> [FunDep TyVar] -> Maybe (KnotTied ThetaType, [ClassATItem], [KnotTied MethInfo], ClassMinimalDef) -> TcRnIf m n Class 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.

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

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

Make the `TyConRepName` for this `TyCon`