CurryInfo: icurry-3.2.0 / FlatCurry.CaseLifting.unboundVars

definition: Info
 
unboundVars :: Expr -> [VarIndex]
unboundVars (Var idx)     = [idx]
unboundVars (Lit _)       = []
unboundVars (Comb _ _ es) = unionMap unboundVars es
unboundVars (Or e1 e2)    = union (unboundVars e1) (unboundVars e2)
unboundVars (Typed e _)   = unboundVars e
unboundVars (Free vs e)   = filter (not . flip elem vs) (unboundVars e)
unboundVars (Let bs e) =
  let unbounds = unionMap unboundVars $ e : map snd bs
      bounds   = map fst bs
  in filter (not . flip elem bounds) unbounds
unboundVars (Case _ e bs) =
  union (unboundVars e) (unionMap unboundVarsInBranch bs)
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
Find all variables which are not bound in an expression.
failfree: Info
 _
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({Var}) |-> {:} || ({Lit}) |-> {[]} || ({Comb}) |-> _ || ({Or}) |-> _ || ({Typed}) |-> _ || ({Free}) |-> {:,[]} || ({Let}) |-> {:,[]} || ({Case}) |-> _}
name: Info
 unboundVars
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 FlatCurry.Types.Expr -> [Prelude.Int]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 reducible on all ground data terms