diff src/mono_print.sml @ 168:25b169416ea8

Storing datatype constructors in type references past monoize
author Adam Chlipala <adamc@hcoop.net>
date Tue, 29 Jul 2008 15:43:17 -0400
parents 6847741e1f5f
children eb3f9913bf31
line wrap: on
line diff
--- a/src/mono_print.sml	Tue Jul 29 15:25:42 2008 -0400
+++ b/src/mono_print.sml	Tue Jul 29 15:43:17 2008 -0400
@@ -53,11 +53,11 @@
                                             space,
                                             p_typ env t]) xcs,
                             string "}"]
-      | TNamed n =>
+      | TDatatype (n, _) =>
         if !debug then
-            string (#1 (E.lookupTNamed env n) ^ "__" ^ Int.toString n)
+            string (#1 (E.lookupDatatype env n) ^ "__" ^ Int.toString n)
         else
-            string (#1 (E.lookupTNamed env n))
+            string (#1 (E.lookupDatatype env n))
       | TFfi (m, x) => box [string "FFI(", string m, string ".", string x, string ")"]
 
 and p_typ env = p_typ' false env
@@ -164,7 +164,7 @@
 
 fun p_datatype env (x, n, cons) =
     let
-        val env = E.pushTNamed env x n NONE
+        val env = E.pushDatatype env x n cons
     in
         box [string "datatype",
              space,