# HG changeset patch # User Adam Chlipala # Date 1243797927 14400 # Node ID 9a1026e2b3f57fbb9a5a4cc027751e4a97b7fe35 # Parent 249740301a0a5318729aaf8afccbed2902136d26 Expose resolveClass from Elaborate diff -r 249740301a0a -r 9a1026e2b3f5 src/elaborate.sig --- a/src/elaborate.sig Sun May 31 13:43:02 2009 -0400 +++ b/src/elaborate.sig Sun May 31 15:25:27 2009 -0400 @@ -30,4 +30,6 @@ 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 -r 249740301a0a -r 9a1026e2b3f5 src/elaborate.sml --- a/src/elaborate.sml Sun May 31 13:43:02 2009 -0400 +++ b/src/elaborate.sml Sun May 31 15:25:27 2009 -0400 @@ -3763,6 +3763,8 @@ (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 @@ 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 @@ 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 =>