CurryInfo: icurry-3.2.0 / ICurry.Interpreter.addAssigns

definition: Info
 
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: Info
 argument 3
deterministic: Info
 deterministic operation
documentation: Info
 
Adds assignments to the graph and environment.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,{[]}) |-> {(,)} || (_,_,{:}) |-> {(,)}}
name: Info
 addAssigns
precedence: Info
 no precedence defined
result-values: Info
 {(,)}
signature: Info
 ICurry.Graph.Graph -> [(Prelude.Int, Prelude.Int)] -> [ICurry.Types.IAssign]
-> (ICurry.Graph.Graph, [(Prelude.Int, Prelude.Int)])
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term