improved character output for SML
authorhaftmann
Thu, 29 Mar 2007 14:21:47 +0200
changeset 22549 ab23925c64d6
parent 22548 6ce4bddf3bcb
child 22550 c5039bee2602
improved character output for SML
src/Pure/Tools/codegen_serializer.ML
--- a/src/Pure/Tools/codegen_serializer.ML	Thu Mar 29 14:21:45 2007 +0200
+++ b/src/Pure/Tools/codegen_serializer.ML	Thu Mar 29 14:21:47 2007 +0200
@@ -375,12 +375,7 @@
       | pr_term vars fxy (INum n) =
           brackets [(str o IntInf.toString) n, str ":", str "IntInf.int"]
       | pr_term vars _ (IChar c) =
-          (str o prefix "#" o quote)
-            (let val i = ord c
-              in if i < 32 orelse i = 34 orelse i = 92
-                then prefix "\\" (string_of_int i)
-                else c
-              end)
+          (str o prefix "#" o quote o ML_Syntax.print_char) c
       | pr_term vars fxy (t as ICase (_, [_])) =
           let
             val (binds, t') = CodegenThingol.unfold_let t;