HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

GHC.Core.ConLike

  • 1 type
  • 18 values
datadata ConLike
#

A constructor-like thing

Instances7Eq, Data, NamedThing, Outputable, Uniquable, OutputableBndr, …

TyVarBinders for the type variables of the ConLike. For pattern synonyms, this will always consist of the universally quantified variables followed by the existentially quantified type variables. For data constructors, the situation is slightly more complicated—see Note [DataCon user type variable binders] in GHC.Core.DataCon.

The "full signature" of the ConLike returns, in order:

1) The universally quantified type variables

2) The existentially quantified type/coercion variables

3) The equality specification

4) The provided theta (the constraints provided by a match)

5) The required theta (the constraints required for a match)

6) The original argument types (i.e. before any change of the representation of the type)

7) The original result type

Is this record field a naughty record field due to the presence of existential type variables?

Different from isNaughtyRecordSelector because the latter is also true in the presence of -XNoFieldSelectors.

See Note [Naughty record selectors] in GHC.Tc.TyCl.Utils.