summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2015-02-16 14:52:56 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2015-02-16 14:52:56 -0500
commitedc47c5a3cc1e717c45229ca674d5337771fd5e1 (patch)
tree8197b19c5bac73381d38f3992eb4fc2b291ad24d
parentddf8af1e904229658f996ef86ade6d91b68f3a5b (diff)
Evaluate minus and times in MonoOpt
-rw-r--r--src/mono_opt.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index 2d40e0f0..04ef7f50 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -630,7 +630,9 @@ fun exp e =
EFfiApp ("Basis", "writec", [e])
| EBinop (_, "+", (EPrim (Prim.Int n1), _), (EPrim (Prim.Int n2), _)) => EPrim (Prim.Int (Int64.+ (n1, n2)))
-
+ | EBinop (_, "-", (EPrim (Prim.Int n1), _), (EPrim (Prim.Int n2), _)) => EPrim (Prim.Int (Int64.- (n1, n2)))
+ | EBinop (_, "*", (EPrim (Prim.Int n1), _), (EPrim (Prim.Int n2), _)) => EPrim (Prim.Int (Int64.* (n1, n2)))
+
| _ => e
and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e)