From 79fbf24fd6ab9965eb8374a06f01daf304788abe Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 24 Jul 2014 02:57:15 +1000 Subject: Fixed cond handling --- src/Grasp/Interpreter.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grasp/Interpreter.hs b/src/Grasp/Interpreter.hs index 56ead7b..03a2978 100644 --- a/src/Grasp/Interpreter.hs +++ b/src/Grasp/Interpreter.hs @@ -66,7 +66,7 @@ execute g ([]:ips) out = execute g ips out execute g (cur:rest) out = let (node,instruction) = head cur condL = targetLabels g (getByLabel "cond" (Graph.out g node)) - goAhead = all (\x -> isJust (readMaybe x >>= return . (/= 0.0))) condL + goAhead = all (\x -> isFloat x && (read :: String -> Float) x /= 0.0) condL in case (goAhead, instruction) of (False,_) -> do -- cgit