Safe Haskell | None |
---|---|
Language | Haskell98 |
A module concerned with finding the free variables of an expression.
- exprFreeVars :: CoreExpr -> VarSet
- exprFreeIds :: CoreExpr -> IdSet
- exprsFreeVars :: [CoreExpr] -> VarSet
- bindFreeVars :: CoreBind -> VarSet
- type InterestingVarFun = Var -> Bool
- exprSomeFreeVars :: InterestingVarFun -> CoreExpr -> VarSet
- exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSet
- varTypeTyVars :: Var -> TyVarSet
- idUnfoldingVars :: Id -> VarSet
- idFreeVars :: Id -> VarSet
- idRuleAndUnfoldingVars :: Id -> VarSet
- idRuleVars :: Id -> VarSet
- idRuleRhsVars :: (Activation -> Bool) -> Id -> VarSet
- stableUnfoldingVars :: Unfolding -> Maybe VarSet
- ruleRhsFreeVars :: CoreRule -> VarSet
- rulesFreeVars :: [CoreRule] -> VarSet
- ruleLhsOrphNames :: CoreRule -> NameSet
- ruleLhsFreeIds :: CoreRule -> VarSet
- vectsFreeVars :: [CoreVect] -> VarSet
- type CoreExprWithFVs = AnnExpr Id VarSet
- type CoreBindWithFVs = AnnBind Id VarSet
- freeVars :: CoreExpr -> CoreExprWithFVs
- freeVarsOf :: CoreExprWithFVs -> IdSet
Free variables of expressions and binding groups
exprFreeVars :: CoreExpr -> VarSetSource
Find all locally-defined free Ids or type variables in an expression
exprFreeIds :: CoreExpr -> IdSetSource
Find all locally-defined free Ids in an expression
exprsFreeVars :: [CoreExpr] -> VarSetSource
Find all locally-defined free Ids or type variables in several expressions
bindFreeVars :: CoreBind -> VarSetSource
Find all locally defined free Ids in a binding group
Selective free variables of expressions
type InterestingVarFun = Var -> BoolSource
Predicate on possible free variables: returns True
iff the variable is interesting
:: InterestingVarFun | Says which |
-> CoreExpr | |
-> VarSet |
Finds free variables in an expression selected by a predicate
exprsSomeFreeVars :: InterestingVarFun -> [CoreExpr] -> VarSetSource
Finds free variables in several expressions selected by a predicate
Free variables of Rules, Vars and Ids
varTypeTyVars :: Var -> TyVarSetSource
idUnfoldingVars :: Id -> VarSetSource
idFreeVars :: Id -> VarSetSource
idRuleVars :: Id -> VarSetSource
idRuleRhsVars :: (Activation -> Bool) -> Id -> VarSetSource
ruleRhsFreeVars :: CoreRule -> VarSetSource
Those variables free in the right hand side of a rule
rulesFreeVars :: [CoreRule] -> VarSetSource
Those variables free in the right hand side of several rules
ruleLhsOrphNames :: CoreRule -> NameSetSource
ruleLhsOrphNames is used when deciding whether a rule is an orphan. In particular, suppose that T is defined in this module; we want to avoid declaring that a rule like:
fromIntegral T = fromIntegral_T
is an orphan. Of course it isn't, and declaring it an orphan would make the whole module an orphan module, which is bad.
ruleLhsFreeIds :: CoreRule -> VarSetSource
This finds all locally-defined free Ids on the left hand side of a rule
vectsFreeVars :: [CoreVect] -> VarSetSource
Free variables of a vectorisation declaration
Core syntax tree annotation with free variables
type CoreExprWithFVs = AnnExpr Id VarSetSource
Every node in an expression annotated with its (non-global) free variables, both Ids and TyVars
type CoreBindWithFVs = AnnBind Id VarSetSource
Every node in a binding group annotated with its (non-global) free variables, both Ids and TyVars
freeVars :: CoreExpr -> CoreExprWithFVsSource
Annotate a CoreExpr
with its (non-global) free type and value variables at every tree node
freeVarsOf :: CoreExprWithFVs -> IdSetSource
Inverse function to freeVars