summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Graph.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Graph.hs b/Graph.hs
index 80f2536..7b034bc 100644
--- a/Graph.hs
+++ b/Graph.hs
@@ -49,7 +49,7 @@ argMap "typeOp" = IO 1 1
argMap "var" = IO 2 1
argMap "varTerm" = IO 1 1
argMap "varType" = IO 1 1
-argMap x | (isNumber x || isName x) = IO 0 1
+argMap x | (isName x) = IO 0 1
@@ -88,6 +88,10 @@ parse gs@(graph,stack,dictionary) str =
'#':rest -> gs
+ n | (isNumber n) -> let node = Node n Set.empty
+ stack' = node <:> stack
+ in (graph, stack', dictionary)
+
x -> let (graph', stack') = process x (argMap x) graph stack
in (graph', stack', dictionary)