Moduleghc-9.10.3GHC2021
GHC.Utils.FV
Utilities for efficiently and deterministically computing free variables.
- 2 types
- 12 values
- Packageghc-9.10.3
- Exports14
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceFV.hs
Deterministic free vars computations
2 declarationsPredicate on possible free variables: returns True iff the variable is
interesting
Running the computations
3 declarationsRun a free variable computation, returning a list of distinct free variables in deterministic order.
Run a free variable computation, returning a non-deterministic set of free variables. Don't use if the set will be later converted to a list and the order of that list will impact the generated code.
Run a free variable computation, returning a deterministic set of free variables. Note that this is just a wrapper around the version that returns a deterministic list. If you need a list you should use fvVarList.
Manipulating those computations
Add a variable - when free, to the returned free variables. Ignores duplicates and respects the filtering function.
Return no free variables.
Add multiple variables - when free, to the returned free variables. Ignores duplicates and respects the filtering function.
Union two free variable computations.
Union many free variable computations.
Mark the variable as not free by putting it in scope.
Mark many free variables as not free.
Filter a free variable computation.
Map a free variable computation over a list and union the results.