Moduleghc-10.0.0.20260917GHC2024
GHC.Core.TyCo.FVs
Contents
Synopsis
- value shallowTyCoVarsOfType
- value shallowTyCoVarsOfTypes
- value shallowTyCoVarsOfCo
- value shallowTyCoVarsOfCos
- value tyCoVarsOfType
- value tyCoVarsOfTypes
- value tyCoVarsOfTypesList
- value tyCoVarsOfThings
- value tyCoVarsOfCo
- value tyCoVarsOfCos
- value tyCoVarsOfMCo
- value tyCoVarsOfTyVarEnv
- value tyCoVarsOfCoVarEnv
- value tyCoVarsOfQuant
- value deepTcvFolder
- value deepTypeFV
- value deepTypesFV
- value deepCoFV
- value tyCoVarsOfTypeDSet
- value tyCoVarsOfTypesDSet
- value tyCoVarsOfTypeList
- value tyCoVarsOfCoDSet
- value tyCoVarsOfCoList
- value tyCoVarsOfThingsDSet
- value deepDetTypeFV
- value deepDetTypesFV
- value deepDetCoFV
- value someTyCoVarsOfType
- value someTyCoVarsOfTypes
- value coVarsOfType
- value coVarsOfTypes
- value coVarsOfCo
- value coVarsOfCos
- value coVarsOfCoDSet
- value coVarsOfCosDSet
- value shallowSelTypeFV
- value shallowSelCoFV
- value almostDevoidCoVarOfCo
- value injectiveVarsOfType
- value injectiveVarsOfTypes
- value isInjectiveInType
- value invisibleVarsOfType
- value invisibleVarsOfTypes
- value anyFreeVarsOfType
- value anyFreeVarsOfTypes
- value anyFreeVarsOfCo
- value noFreeVarsOfType
- value noFreeVarsOfTypes
- value noFreeVarsOfCo
- value tyConsOfType
- value tyConsOfTypes
- value visVarsOfTypes
- value visVarsOfType
- value occCheckExpand
- value closeOverKindsDSet
- value closeOverKinds
- Packageghc-10.0.0.20260917
- Exports56
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceFVs.hs
Returns free variables of types, including kind variables as a deterministically ordered list. For type synonyms it does not expand the synonym.
Returns free variables of types, including kind variables as a non-deterministic set. For type synonyms it does not expand the synonym.
tyCoVarsOfTypeDSet that returns deep free variables of a type in a deterministic set. For explanation of why using VarSet is not deterministic see Note [Deterministic FV] in GHC.Types.Var.FV.
Returns free variables of types, including kind variables as a deterministic set. For type synonyms it does not expand the synonym.
tyCoVarsOfTypeList returns free variables of a type in deterministic order. For explanation of why using VarSet is not deterministic see Note [Deterministic FV] in GHC.Types.Var.FV.
Given a covar and a coercion, returns True if covar is almost devoid in the coercion. That is, covar can only appear in Refl and GRefl. See (FC6) in Note [ForAllCo] in GHC.Core.TyCo.Rep
injectiveVarsOfType :: BoolShould we look under injective type families? See Note [Coverage condition for injective type families] in GHC.Tc.Instance.Family.
-> Type-> VarSet
Returns the free variables of a Type that are in injective positions. Specifically, it finds the free variables while:
Expanding type synonyms
Ignoring the coercion in
(ty |> co)Ignoring the non-injective fields of a TyConApp
For example, if F is a non-injective type family, then:
injectiveTyVarsOf( Either c (Maybe (a, F b c)) ) = {a,c}
If injectiveVarsOfType ty = itvs, then knowing ty fixes itvs.
More formally, if
a is in injectiveVarsOfType ty
and S1(ty) ~ S2(ty),
then S1(a) ~ S2(a),
where S1 and S2 are arbitrary substitutions.
See Note [When does a tycon application need an explicit kind signature?].
injectiveVarsOfTypes :: Boollook under injective type families? See Note [Coverage condition for injective type families] in GHC.Tc.Instance.Family.
-> [Type]-> VarSet
Returns the set of variables that are used invisibly anywhere within the given type. A variable will be included even if it is used both visibly and invisibly. An "invisible" use site includes: * In the kind of a variable * In the kind of a bound variable in a forall * In a coercion * In a Specified or Inferred argument to a function See Note [VarBndrs, ForAllTyBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep
Like invisibleVarsOfType, but for many types.
Free type constructors
All type constructors occurring in the type; looking through type synonyms, but not newtypes. When it finds a Class, it returns the class TyCon.
Free vars with visible/invisible separate
Retrieve the free variables in this type, splitting them based on whether they are used visibly or invisibly. Invisible ones come first.
Occurrence-check expansion
Closing over kinds
Add the kind variables free in the kinds of the tyvars in the given set. Returns a deterministic set.