diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-10-21 08:51:30 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-10-21 08:51:30 -0400 |
commit | 5916db3c7a6460d0547116b8ab083e6ac0d4d4e3 (patch) | |
tree | 053c64d944479ceffca910e14861c4ecd6dcfed6 | |
parent | b24fbf5d255d3e32338cb43f447a8369deef4b0b (diff) |
Catch UnboundNamed exceptions that arise from missing signature items
-rw-r--r-- | src/elaborate.sml | 3 | ||||
-rw-r--r-- | tests/ubn.ur | 8 | ||||
-rw-r--r-- | tests/ubn.urs | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml index 1473613c..f331d813 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -3265,7 +3265,8 @@ and subSgn' counterparts env strLoc sgn1 (sgn2 as (_, loc2)) = | _ => 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 diff --git a/tests/ubn.ur b/tests/ubn.ur new file mode 100644 index 00000000..0bb50bab --- /dev/null +++ b/tests/ubn.ur @@ -0,0 +1,8 @@ +con e = [] +structure B : sig +end = struct +end +open B + +fun main () = + return <xml></xml> diff --git a/tests/ubn.urs b/tests/ubn.urs new file mode 100644 index 00000000..5ae8bfc7 --- /dev/null +++ b/tests/ubn.urs @@ -0,0 +1,3 @@ +val main : unit -> transaction page +con a = [] +con e = a |