diff src/cjr_print.sml @ 757:fa2019a63ea4

Basis.list
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 11:07:29 -0400
parents 8ce31c052dce
children 8323c1beef2e
line wrap: on
line diff
--- a/src/cjr_print.sml	Tue Apr 28 17:26:53 2009 -0400
+++ b/src/cjr_print.sml	Thu Apr 30 11:07:29 2009 -0400
@@ -102,6 +102,11 @@
         else
             box [p_typ' par env t,
                  string "*"]
+      | TList (_, i) => box [string "struct",
+                             space,
+                             string "__uws_",
+                             string (Int.toString i),
+                             string "*"]
 
 and p_typ env = p_typ' false env
 
@@ -147,7 +152,7 @@
         PConVar n => p_con_named env n
       | PConFfi {mod = m, con, ...} => string ("uw_" ^ ident m ^ "_" ^ ident con)
 
-fun p_pat (env, exit, depth) (p, _) =
+fun p_pat (env, exit, depth) (p, loc) =
     case p of
         PWild =>
         (box [], env)
@@ -328,6 +333,10 @@
                 in
                     (box [string "{",
                           newline,
+                          string "/* ",
+                          string (ErrorMsg.spanToString loc),
+                          string "*/",
+                          newline,
                           p_typ env t,
                           space,
                           string "disc",
@@ -574,6 +583,7 @@
               | TFfi ("Basis", "blob") => allowHeapAllocated
               | TFfi _ => true
               | TOption t => allowHeapAllocated andalso nl ok t
+              | TList (t, _) => allowHeapAllocated andalso nl ok t
     in
         nl IS.empty
     end