|
definition: |
selectLitBranch :: Node -> [ILitBranch] -> IBlock
selectLitBranch nd [] =
error $ "selectLitBranch: no branch for node: " ++ show nd
selectLitBranch nd (ILitBranch l blck : branches) = case nd of
ConsNode nc _ -> if nc == showILit l then blck
else selectLitBranch nd branches
_ -> error $ "selectLitBranch: unevaluated branch node: " ++
show nd
|
|
demand: |
argument 2 |
|
deterministic: |
deterministic operation |
|
documentation: |
Selects the literal branch corresponding to some literal node. |
|
failfree: |
(_, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,{[]}) |-> _ || ({ConsNode},{:}) |-> _ || ({FuncNode},{:}) |-> _ || ({PartNode},{:}) |-> _ || ({ChoiceNode},{:}) |-> _ || ({FreeNode},{:}) |-> _}
|
|
name: |
selectLitBranch |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
ICurry.Graph.Node -> [ICurry.Types.ILitBranch] -> ICurry.Types.IBlock |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |