Moduleghc-9.10.3GHC2021
GHC.Tc.Gen.HsType
Typechecking user-specified MonoTypes
- 6 types
- 59 values
- Packageghc-9.10.3
- Exports65
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceHsType.hs
tcDerivStrategy :: Maybe (LDerivStrategy GhcRn)The deriving strategy
-> TcM (Maybe (LDerivStrategy GhcTc), [TcTyVar])The typechecked deriving strategy and the tyvars that it binds (if using ViaStrategy).
Typecheck a deriving strategy. For most deriving strategies, this is a
no-op, but for the via strategy, this requires typechecking the via type.
Type-check a visible type application
UserTypeCtxt describes the origin of the polymorphic type in the places where we need an expression to have that type
Constructors
FunSigCtxt Name ReportRedundantConstraintsInfSigCtxt NameExprSigCtxt ReportRedundantConstraintsKindSigCtxtStandaloneKindSigCtxt NameTypeAppCtxtConArgCtxt NameTySynCtxt NamePatSynCtxt NamePatSigCtxtRuleSigCtxt FastString NameForSigCtxt NameDefaultDeclCtxtInstDeclCtxt BoolSpecInstCtxtGenSigCtxtGhciCtxt BoolClassSCCtxt NameSigmaCtxtDataTyCtxt NameDerivClauseCtxtTyVarBndrKindCtxt NameDataKindCtxt NameTySynKindCtxt NameTyFamResKindCtxt Name
Instances1Eq
Eq UserTypeCtxtDefined in ghc-9.10.3 · GHC.Tc.Types.Origin
Skolemise the HsTyVarBndrs in an HsForAllTelescope with the supplied
TcTyMode.
Bring into scope the binders of a PolyTcTyCon Used for the type variables of a type or class decl in the "kind checking" and "type checking" pass, but not in the initial-kind run.
Constructors
Instances1Outputable
Outputable SAKS_or_CUSKDefined in ghc-9.10.3 · GHC.Tc.Gen.HsType
Describes the kind expected in a certain context.
Instances1Outputable
Outputable ContextKindDefined in ghc-9.10.3 · GHC.Tc.Gen.HsType
kcDeclHeader :: InitialKindStrategy-> Nameof the thing being checked
-> TyConFlavour TyConWhat sort of TyCon is being checked
-> LHsQTyVars GhcRnBinders in the header
-> TcM ContextKindThe result kind
-> TcM TcTyConA suitably-kinded TcTyCon
Specialised version of
kindGeneralizeSome, but with empty WantedConstraints, so no filtering is needed i.e. kindGeneraliseAll = kindGeneralizeSome emptyWC
Checks that the return kind in a data declaration's kind signature is permissible. There are three cases:
If dealing with a data, newtype, data instance, or newtype instance
declaration, check that the return kind is Type.
If the declaration is a newtype or newtype instance and the
UnliftedNewtypes extension is enabled, this check is slightly relaxed so
that a return kind of the form TYPE r (for some r) is permitted.
See Note [Implementation of UnliftedNewtypes] in GHC.Tc.TyCl.
If dealing with a data family declaration, check that the return kind is
either of the form:
TYPE r(for somer), ork(wherekis a bare kind variable; see #12369)
See also Note [Datatype return kinds] in GHC.Tc.TyCl
A description of whether something is a
dataornewtype(DataDeclSort)data instanceornewtype instance(DataInstanceSort)data family(DataFamilySort)
At present, this data type is only consumed by checkDataKindSig.
Checks that the result kind of a class is exactly Constraint, rejecting
type synonyms and type families that reduce to Constraint. See #16826.
Instances1Outputable
Outputable HoleModeDefined in ghc-9.10.3 · GHC.Tc.Gen.HsType
Make an appropriate message for an error in a function argument. Used for both expressions and types.
Add a "In the data declaration for T" or some such.