changeset 1580:ec466c1e082a

Catch UnboundNamed exceptions that arise from missing signature items
author Adam Chlipala <adam@chlipala.net>
date Fri, 21 Oct 2011 08:51:30 -0400
parents e1f4ac9ca34b
children 1ced338f691a
files src/elaborate.sml tests/ubn.ur tests/ubn.urs
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/elaborate.sml	Fri Oct 21 08:36:10 2011 -0400
+++ b/src/elaborate.sml	Fri Oct 21 08:51:30 2011 -0400
@@ -3265,7 +3265,8 @@
 
       | _ => sgnError env (SgnWrongForm (strLoc, sgn1, sgn2)))
 
-and subSgn env = subSgn' (ref IM.empty) env
+and subSgn env x y z = subSgn' (ref IM.empty) env x y z
+    handle e as E.UnboundNamed _ => if ErrorMsg.anyErrors () then () else raise e
 
 and positive self =
     let
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/ubn.ur	Fri Oct 21 08:51:30 2011 -0400
@@ -0,0 +1,8 @@
+con e = []
+structure B : sig
+end = struct
+end
+open B
+
+fun main () =
+ return <xml></xml>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/ubn.urs	Fri Oct 21 08:51:30 2011 -0400
@@ -0,0 +1,3 @@
+val main : unit -> transaction page
+con a = []
+con e = a