diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-04-12 18:21:28 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-04-12 18:21:28 +1000 |
commit | c01b04cbeb3be96fd4e65103526872392d79886f (patch) | |
tree | 0959c10e403440415eb886ff8bfbc975e3bd148a /src/Thue/Interpreter.hs | |
parent | b123d2018f88570bdf1c1a93f19ee00cdcdf216d (diff) |
Changes to allow for thuestates that aren't mere strings
Diffstat (limited to 'src/Thue/Interpreter.hs')
-rw-r--r-- | src/Thue/Interpreter.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Thue/Interpreter.hs b/src/Thue/Interpreter.hs index c53bff9..7c41718 100644 --- a/src/Thue/Interpreter.hs +++ b/src/Thue/Interpreter.hs @@ -34,9 +34,9 @@ interpret state rules gen = do (before, after) = fromJust (extractInfix (original ruleToApply) state) state' <- case (replacement ruleToApply) of - ":::" -> getLine >>= (\x -> return (before ++ x ++ after)) + ":::" -> getLine >>= return . toThueState >>= (\x -> return (before ++ x ++ after)) - '~':xs -> putStr xs >> return (before ++ after) + '~':xs -> return (fromThueState xs) >>= putStr >> return (before ++ after) x -> return (before ++ x ++ after) |