CurryInfo: icurry-3.2.0 / ICurry.Interpreter.addAssigns

definition:
addAssigns :: Graph -> IEnv -> [IAssign] -> (Graph,IEnv)
addAssigns g env [] = (g,env)
addAssigns g env (IVarAssign v e : asgns) =
  let (g1,ne)  = extendGraph g env e
      (g2,nid) = either (\ni -> (g1,ni)) (\nd -> addNode nd g1) ne
  in addAssigns g2 (updateEnv env v nid) asgns
addAssigns _ _ (INodeAssign _ [] _ : _) =
  error "addAssigns: empty path"
addAssigns g env (INodeAssign v path@(_:_) e : asgns) =
  let n        = followPath g (lookupInEnv v env) (init path)
      (g1,ne)  = extendGraph g env e
      (g2,nid) = either (\ni -> (g1,ni)) (\nd -> addNode nd g1) ne
  in addAssigns (replaceNodeArg g2 n (last path) nid) env asgns
demand:
argument 3
deterministic:
deterministic operation
documentation:
-- Adds assignments to the graph and environment.
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,{[]}) |-> {(,)} || (_,_,{:}) |-> {(,)}}
name:
addAssigns
precedence:
no precedence defined
result-values:
{(,)}
signature:
ICurry.Graph.Graph -> [(Prelude.Int, Prelude.Int)] -> [ICurry.Types.IAssign]
-> (ICurry.Graph.Graph, [(Prelude.Int, Prelude.Int)])
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term