Mercurial > urweb
comparison src/mono_opt.sml @ 2083:9f65e2188d3c
MonoOpt: remove concatenation with empty string
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 03 Dec 2014 21:21:37 -0500 |
parents | 1b76ae703cbb |
children | fd6d362666c0 |
comparison
equal
deleted
inserted
replaced
2082:1b76ae703cbb | 2083:9f65e2188d3c |
---|---|
164 end | 164 end |
165 else | 165 else |
166 e | 166 e |
167 | 167 |
168 | EFfiApp ("Basis", "strcat", [(e1, _), (e2, _)]) => exp (EStrcat (e1, e2)) | 168 | EFfiApp ("Basis", "strcat", [(e1, _), (e2, _)]) => exp (EStrcat (e1, e2)) |
169 | |
170 | EStrcat (e1, (EPrim (Prim.String (_, "")), _)) => #1 e1 | |
171 | EStrcat ((EPrim (Prim.String (_, "")), _), e2) => #1 e2 | |
169 | 172 |
170 | EStrcat ((EPrim (Prim.String (Prim.Html, s1)), loc), (EPrim (Prim.String (Prim.Html, s2)), _)) => | 173 | EStrcat ((EPrim (Prim.String (Prim.Html, s1)), loc), (EPrim (Prim.String (Prim.Html, s2)), _)) => |
171 let | 174 let |
172 val s = | 175 val s = |
173 if size s1 > 0 andalso size s2 > 0 | 176 if size s1 > 0 andalso size s2 > 0 |