eval (And e0 e1) = evalb (&&) e0 e1
eval (Or e0 e1) = evalb (||) e0 e1
-eval (Not e0 ) = evalb (const not) e0 (Const (B True))
+eval (Not e) = evalb (const not) (Const (B True)) e
eval (Eq e0 e1) = evalib (==) e0 e1
eval (Gt e0 e1) = evalib (>) e0 e1
"r increment" -> debugProg increment
"r tryCatch" -> debugProg tryCatch
"r fibonacci" -> debugProg fibonacci
+ "r boolNot" -> debugProg boolNot
('r':' ':file) -> read <$> readFile file >>= debugProg
x -> printUnknown x >> menu
(Seq (Assign "x" (Add (Var "x") (Var "y")))
(Seq (Assign "y" (Var "x"))
(Assign "n" (Sub (Var "n") (Const (I 1))))))))))
+
+boolNot :: Statement
+boolNot = Print (Not (Const (B False)))
--- /dev/null
+Seq (Assign "n" 5) (Seq (Assign "x" 1) (Seq (Assign "y" 0) (While n > 0 (Seq (Assign "tmp" x) (Seq (Assign "x" x + y) (Seq (Assign "y" x) (Assign "n" n - 1)))))))
\ No newline at end of file
maintainer: luke_lau@icloud.com
category: Development
build-type: Simple
-extra-source-files: stack.yaml, README.md
+extra-source-files: stack.yaml, README.md, *.prog
cabal-version: >=1.10
executable ttdb