amrun 0.0.0.3 → 0.0.0.4
raw patch · 2 files changed
+4/−2 lines, 2 files
Files
- amrun.cabal +1/−1
- src/amrun.hs +3/−1
amrun.cabal view
@@ -1,5 +1,5 @@ Name: amrun-Version: 0.0.0.3+Version: 0.0.0.4 Synopsis: Interpreter for AM Description: The package contains an interpreter for the AM-Language that is introduced in the basic programming course \"Algorithmisches Denken und imperative Programmierung\" (WS 2011/12 and later) at the University of Bonn. License: GPL
src/amrun.hs view
@@ -151,7 +151,9 @@ Just c -> do sign <- if cmd == "LIT" then neg else return 1 arg <- (pcParser <?> "command argument")- return (c (sign*arg))+ if cmd == "LIT" + then return (c (sign*arg))+ else (if arg == 0 then unexpected (cmd ++ " does not take 0 as argument.") else return (c arg)) Nothing -> unexpected (cmd ++ " is not a command.") } where