changeset 947:e2305dcc3965

Print char patterns in C
author Adam Chlipala <adamc@hcoop.net>
date Thu, 17 Sep 2009 09:25:03 -0400
parents 2412cb10c97c
children b03d48aac959
files src/cjr_print.sml
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cjr_print.sml	Tue Sep 15 16:27:24 2009 -0400
+++ b/src/cjr_print.sml	Thu Sep 17 09:25:03 2009 -0400
@@ -193,6 +193,19 @@
               space,
               exit],
          env)
+      | PPrim (Prim.Char ch) =>
+        (box [string "if",
+              space,
+              string "(disc",
+              string (Int.toString depth),
+              space,
+              string "!=",
+              space,
+              Prim.p_t_GCC (Prim.Char ch),
+              string ")",
+              space,
+              exit],
+         env)
       | PPrim _ => raise Fail "CjrPrint: Disallowed PPrim primitive"
 
       | PCon (dk, pc, po) =>