From 7639360d7a0111054b68c3fe91bb2558706aaefc Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Wed, 3 Dec 2014 21:21:37 -0500 Subject: MonoOpt: remove concatenation with empty string --- src/mono_opt.sml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mono_opt.sml') diff --git a/src/mono_opt.sml b/src/mono_opt.sml index a49d54e1..211b273e 100644 --- a/src/mono_opt.sml +++ b/src/mono_opt.sml @@ -166,6 +166,9 @@ fun exp e = e | EFfiApp ("Basis", "strcat", [(e1, _), (e2, _)]) => exp (EStrcat (e1, e2)) + + | EStrcat (e1, (EPrim (Prim.String (_, "")), _)) => #1 e1 + | EStrcat ((EPrim (Prim.String (_, "")), _), e2) => #1 e2 | EStrcat ((EPrim (Prim.String (Prim.Html, s1)), loc), (EPrim (Prim.String (Prim.Html, s2)), _)) => let -- cgit v1.2.3