diff options
author | Jed Barber <jjbarber@y7mail.com> | 2012-06-14 09:40:25 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2012-06-14 09:40:25 +1000 |
commit | bd7d6db4cee36a3535f8de97c1c0642e1b31106b (patch) | |
tree | a87ef9e9769ebccc818cc990bdfb99e5998ca95f | |
parent | 8ad06c403574b47e8cce845bf3a3816d841777b9 (diff) |
Changed numbers to be handled specially since they're only used by def/ref/remove
-rw-r--r-- | Graph.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |