diff src/elaborate.sml @ 1745:518e0b23c4ef

-dumpTypesOnError
author Adam Chlipala <adam@chlipala.net>
date Sat, 05 May 2012 12:58:13 -0400
parents 6fcce0592178
children 1bbad32cb4a8
line wrap: on
line diff
--- a/src/elaborate.sml	Sat May 05 12:45:35 2012 -0400
+++ b/src/elaborate.sml	Sat May 05 12:58:13 2012 -0400
@@ -39,6 +39,7 @@
  open ElabErr
 
  val dumpTypes = ref false
+ val dumpTypesOnError = ref false
  val unifyMore = ref false
  val incremental = ref false
  val verbose = ref false
@@ -4747,7 +4748,7 @@
 
         (*preface ("file", p_file env' file);*)
 
-        if !dumpTypes then
+        if !dumpTypes orelse (!dumpTypesOnError andalso ErrorMsg.anyErrors ()) then
             let
                 open L'
                 open Print.PD