diff options
author | Adam Chlipala <adam@chlipala.net> | 2014-12-03 21:06:15 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2014-12-03 21:06:15 -0500 |
commit | c881c3b462801bc67419783c4169302fce5e3aeb (patch) | |
tree | f6fa67ac04d64173f412ca0b28f2257a03167463 /src/mono_opt.sml | |
parent | b2b29ea1e208836b21842ce2126fb9fd8521247e (diff) |
Some more optimization of string expressions showing up in JSON generation (Meta library)
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r-- | src/mono_opt.sml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml index d1e5ce55..a49d54e1 100644 --- a/src/mono_opt.sml +++ b/src/mono_opt.sml @@ -220,6 +220,11 @@ fun exp e = | EWrite (EFfiApp ("Basis", "htmlifySpecialChar", [e]), _) => EFfiApp ("Basis", "htmlifySpecialChar_w", [e]) + | EWrite (EFfiApp ("Basis", "intToString", [e]), _) => + EFfiApp ("Basis", "htmlifyInt_w", [e]) + | EApp ((EFfi ("Basis", "intToString"), loc), e) => + EFfiApp ("Basis", "intToString", [(e, (TFfi ("Basis", "int"), loc))]) + | EFfiApp ("Basis", "htmlifyString", [((EFfiApp ("Basis", "intToString", [((EPrim (Prim.Int n), _), _)]), _), _)]) => EPrim (Prim.String (Prim.Html, htmlifyInt n)) | EFfiApp ("Basis", "htmlifyString", [((EFfiApp ("Basis", "intToString", es), _), _)]) => |