From bd7d6db4cee36a3535f8de97c1c0642e1b31106b Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 14 Jun 2012 09:40:25 +1000 Subject: Changed numbers to be handled specially since they're only used by def/ref/remove --- Graph.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit