From 97570513feb954bc3845f349700f1117fd50ca4b Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 31 May 2009 15:25:27 -0400 Subject: Expose resolveClass from Elaborate --- src/elaborate.sig | 2 ++ src/elaborate.sml | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/elaborate.sig b/src/elaborate.sig index cab3c3c5..0dbf36e3 100644 --- a/src/elaborate.sig +++ b/src/elaborate.sig @@ -30,4 +30,6 @@ signature ELABORATE = sig val elabFile : Source.sgn_item list -> Source.decl list -> Source.sgn_item list -> ElabEnv.env -> Source.file -> Elab.file + val resolveClass : ElabEnv.env -> Elab.con -> Elab.exp option + end diff --git a/src/elaborate.sml b/src/elaborate.sml index 961c2b2e..62d99bf3 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -3763,6 +3763,8 @@ and elabStr (env, denv) (str, loc) = (strerror, sgnerror, [])) end +fun resolveClass env = E.resolveClass (hnormCon env) (consEq env) env + fun elabFile basis topStr topSgn env file = let val () = mayDelay := true @@ -3815,7 +3817,7 @@ fun elabFile basis topStr topSgn env file = let val c = normClassKey env c in - case E.resolveClass (hnormCon env) (consEq env) env c of + case resolveClass env c of SOME e => r := SOME e | NONE => expError env (Unresolvable (loc, c)) end) gs @@ -3888,7 +3890,7 @@ fun elabFile basis topStr topSgn env file = val c = normClassKey env c in - case E.resolveClass (hnormCon env) (consEq env) env c of + case resolveClass env c of SOME e => (r := SOME e; (NONE, true)) | NONE => -- cgit v1.2.3