HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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
datadata UserTypeCtxt
#
Instances1Eq
valuebindTyClTyVars :: Name -> ([TcTyConBinder] -> TcKind -> TcM a) -> TcM a
#

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.

  • Specialised version of kindGeneralizeSome, but with empty WantedConstraints, so no filtering is needed i.e. kindGeneraliseAll = kindGeneralizeSome emptyWC

valuecheckDataKindSig :: DataSort -> Kind -> TcM ()
#

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:

  1. TYPE r (for some r), or

  2. k (where k is a bare kind variable; see #12369)

See also Note [Datatype return kinds] in GHC.Tc.TyCl

valuecheckClassKindSig :: Kind -> TcM ()
#

Checks that the result kind of a class is exactly Constraint, rejecting type synonyms and type families that reduce to Constraint. See #16826.