Find all locally-defined free Ids or type variables in an expression returning a non-deterministic set.
Moduleghc-10.0.0.20260917GHC2024
GHC.Core.FVs
A module concerned with finding the free variables of an expression.
Contents
Synopsis
- value exprFreeVars
- value exprsFreeVars
- value exprFreeVarsDSet
- value exprFreeVarsList
- value exprsFreeVarsList
- value exprFreeIds
- value exprsFreeIds
- value exprFreeIdsDSet
- value exprsFreeIdsDSet
- value exprFreeIdsList
- value exprsFreeIdsList
- value bindFreeVars
- type InterestingVarFun
- value exprSomeFreeVars
- value exprsSomeFreeVars
- value exprSomeFreeVarsList
- value exprsSomeFreeVarsList
- value exprsSomeFreeVarsDSet
- value deepExprsFreeVarsDSet
- value bndrTypeTyCoFVs
- value bndrFVs
- value dBndrFreeVars
- value idUnfoldingVars
- value bndrFreeVars
- value bndrRuleAndUnfoldingVarsDSet
- value bndrRuleAndUnfoldingVars
- value idRuleVars
- value stableUnfoldingVars
- value ruleFreeVars
- value rulesFreeVars
- value rulesFreeVarsDSet
- value mkRuleInfo
- value ruleLhsFreeIds
- value ruleLhsFreeIdsList
- value ruleRhsFreeVars
- value rulesRhsFreeIds
- value exprFVs
- value addCoreBndrFV
- value addCoreBndrsFV
- value unitFV
- value orphNamesOfType
- value orphNamesOfTypes
- value orphNamesOfAxiomLHS
- value orphNamesOfExprs
- type FVAnn
- type CoreExprWithFVs
- type CoreExprWithFVs'
- type CoreBindWithFVs
- type CoreAltWithFVs
- value freeVars
- value freeVarsBind
- value freeVarsOf
- value freeVarsOfAnn
- Packageghc-10.0.0.20260917
- Exports53
- LanguageGHC2024
- LicenceBSD-3-Clause
- SourceFVs.hs
Free variables of expressions and binding groups
Find all locally-defined free Ids or type variables in several expressions returning a non-deterministic set.
Find all locally-defined free Ids or type variables in an expression returning a deterministic set.
Find all locally-defined free Ids or type variables in an expression returning a deterministically ordered list.
Find all locally-defined free Ids or type variables in several expressions returning a deterministically ordered list.
Find all locally-defined free Ids in an expression
Find all locally-defined free Ids in an expression returning a deterministic set.
Find all locally-defined free Ids in several expressions returning a deterministic set.
Find all locally-defined free Ids in an expression returning a deterministically ordered list.
Find all locally-defined free Ids in several expressions returning a deterministically ordered list.
Find all locally defined free Ids in a binding group
Selective shallow free variables of expressions
Finds free variables in an expression selected by a predicate
Finds free variables in several expressions selected by a predicate
Finds free variables in an expression selected by a predicate returning a deterministically ordered list.
Finds free variables in several expressions selected by a predicate returning a deterministically ordered list.
exprsSomeFreeVarsDSet :: InterestingVarFunSays which Vars are interesting
-> [CoreExpr]-> DVarSet
Finds free variables in several expressions selected by a predicate returning a deterministic set.
Free variables of Rules, Vars and Ids
Those variables free in the both the left right hand sides of a rule returned as a non-deterministic set
Those variables free in both the left right hand sides of several rules
Those variables free in the both the left right hand sides of rules returned as a deterministic set
This finds all locally-defined free Ids on the left hand side of a rule and returns them as a non-deterministic set
This finds all locally-defined free Ids on the left hand side of a rule and returns them as a deterministically ordered list
Those variables free in the right hand side of a rule returned as a non-deterministic set
Those locally-defined free Ids in the right hand side of several rules returned as a non-deterministic set
Orphan names
orphNamesOfAxiomLHS collects the names of the concrete types and type constructors that make up the LHS of a type family instance, including the family name itself.
For instance, given `type family Foo a b`: `type instance Foo (F (G (H a))) b = ...` would yield [Foo,F,G,H]
Used (via orphNamesOfFamInst) in the implementation of ":info" in GHCi. and when determining orphan-hood for a FamInst or module
Finds the free external names of several expressions: see exprOrphNames for details
Core syntax tree annotation with free variables
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type. NB: see Note [The FVAnn invariant]
Every node in a binding group annotated with its (non-global) free variables, both Ids and TyVars, and type.
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars, and type.
Annotate a CoreExpr with its (non-global) free type and value variables at every tree node.
Inverse function to freeVars
Extract the vars reported in a FVAnn