X-Git-Url: http://git.lukelau.me/?p=timetravel.git;a=blobdiff_plain;f=Programs.hs;fp=Programs.hs;h=22cc493266ed76f1658de6330343412202fcaab6;hp=0000000000000000000000000000000000000000;hb=9a09a1be54afb5e15dfea8a8676bd6e1941b37ec;hpb=7c8e673e4ad1b59527ae5fb6f15365e4f40905c6 diff --git a/Programs.hs b/Programs.hs new file mode 100644 index 0000000..22cc493 --- /dev/null +++ b/Programs.hs @@ -0,0 +1,12 @@ +module Programs where + +import AST + +testProg :: Statement +testProg = Seq (Assign "x" (Const (I 0))) loop + where loop = Seq (Print (Var "x")) + (Seq (Assign "x" (Add (Var "x") (Const (I 1)))) + loop) +testTry :: Statement +testTry = Try (Print (Add (Const (I 3)) (Const (B True)))) + (Print (Const (I 0)))