definition: |
generateXmlNode :: NodeID -> [NodeID] -> (NodeID, Node) -> XmlExp generateXmlNode activenid results (nid, node) = XElem "node" [] [ xmlEntry "id" (show nid), xmlEntry "type" nType, xmlEntry "label" label, xmlEntry "isActive" (show isActive), xmlEntry "isResult" (show isResult), XElem "children" [] (map ((xmlEntry "nodeId") . show) succs) ] where (nType, label, succs) = case node of FuncNode nm chld -> ("FuncNode", nm, chld) ConsNode nm chld -> ("ConsNode", nm, chld) ChoiceNode cid chld1 chld2 -> ("ChoiceNode", "? " ++ show cid, [chld1, chld2]) FreeNode -> ("FreeNode", "free", []) PartNode nm (PartFuncCall _) chld -> ("FuncNode", nm, chld) PartNode nm (PartConsCall _) chld -> ("ConsNode", nm, chld) isActive = nid == activenid isResult = elem nid results |
demand: |
argument 3 |
deterministic: |
deterministic operation |
documentation: |
-- generate a xml representation of a graph node that contains -- attributes relevant for drawing the graph |
failfree: |
(_, _, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,_,{(,)}) |-> {XElem}} |
name: |
generateXmlNode |
precedence: |
no precedence defined |
result-values: |
{XElem} |
signature: |
Prelude.Int -> [Prelude.Int] -> (Prelude.Int, ICurry.Graph.Node) -> XML.XmlExp |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |