diff src/expl_print.sml @ 480:40c737913075

Especialize handles records better
author Adam Chlipala <adamc@hcoop.net>
date Sat, 08 Nov 2008 16:02:59 -0500
parents d34834af4512
children ae03d09043c1
line wrap: on
line diff
--- a/src/expl_print.sml	Sat Nov 08 14:42:52 2008 -0500
+++ b/src/expl_print.sml	Sat Nov 08 16:02:59 2008 -0500
@@ -97,7 +97,7 @@
       | CModProj (m1, ms, x) =>
         let
             val m1x = #1 (E.lookupStrNamed env m1)
-                      handle E.UnboundNamed _ => "UNBOUND"
+                      handle E.UnboundNamed _ => "UNBOUND" ^ Int.toString m1
 
             val m1s = if !debug then
                           m1x ^ "__" ^ Int.toString m1
@@ -226,7 +226,7 @@
       | EModProj (m1, ms, x) =>
         let
             val (m1x, sgn) = E.lookupStrNamed env m1
-                handle E.UnboundNamed _ => ("UNBOUND", (SgnConst [], loc))
+                handle E.UnboundNamed _ => ("UNBOUND" ^ Int.toString m1, (SgnConst [], loc))
 
             val m1s = if !debug then
                           m1x ^ "__" ^ Int.toString m1
@@ -487,11 +487,11 @@
                               newline,
                               string "end"]
       | SgnVar n => string ((#1 (E.lookupSgnNamed env n))
-                            handle E.UnboundNamed _ => "UNBOUND")
+                            handle E.UnboundNamed _ => "UNBOUND" ^ Int.toString n)
       | SgnFun (x, n, sgn, sgn') => box [string "functor",
                                          space,
                                          string "(",
-                                         string x,
+                                         p_named x n,
                                          space,
                                          string ":",
                                          space,
@@ -515,7 +515,7 @@
       | SgnProj (m1, ms, x) =>
         let
             val (m1x, sgn) = E.lookupStrNamed env m1
-                handle E.UnboundNamed _ => ("UNBOUND", (SgnConst [], loc))
+                handle E.UnboundNamed _ => ("UNBOUND" ^ Int.toString m1, (SgnConst [], loc))
                              
             val m1s = if !debug then
                           m1x ^ "__" ^ Int.toString m1
@@ -643,7 +643,7 @@
       | StrVar n =>
         let
             val x = #1 (E.lookupStrNamed env n)
-                    handle E.UnboundNamed _ => "UNBOUND"
+                    handle E.UnboundNamed _ => "UNBOUND" ^ Int.toString n
 
             val s = if !debug then
                         x ^ "__" ^ Int.toString n
@@ -662,7 +662,7 @@
             box [string "functor",
                  space,
                  string "(",
-                 string x,
+                 p_named x n,
                  space,
                  string ":",
                  space,