changeset 833:9a1026e2b3f5

Expose resolveClass from Elaborate
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 May 2009 15:25:27 -0400
parents 249740301a0a
children 74e9e7642f08
files src/elaborate.sig src/elaborate.sml
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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 =>