aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/elaborate.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-05-05 12:45:35 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-05-05 12:45:35 -0400
commitf2ae62f46ac8b9cefc841bd064c7ea8317cc9752 (patch)
tree85b4d5ef5bf9c2f5087c15d4d480ea04394dea8a /src/elaborate.sml
parentd216e49c1b5e7f25d95e9cb1dd8bcdbbc71389c5 (diff)
Send daemon output to calling process
Diffstat (limited to 'src/elaborate.sml')
-rw-r--r--src/elaborate.sml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/elaborate.sml b/src/elaborate.sml
index 5799d6bb..fe2e2f12 100644
--- a/src/elaborate.sml
+++ b/src/elaborate.sml
@@ -41,6 +41,7 @@
val dumpTypes = ref false
val unifyMore = ref false
val incremental = ref false
+ val verbose = ref false
structure IS = IntBinarySet
structure IM = IntBinaryMap
@@ -3931,6 +3932,7 @@ and elabDecl (dAll as (d, loc), (env, denv, gs)) =
(case ModDb.lookup dAll of
SOME d =>
let
+ val () = if !verbose then TextIO.print ("REUSE: " ^ x ^ "\n") else ()
val env' = E.declBinds env d
val denv' = dopenConstraints (loc, env', denv) {str = x, strs = []}
in
@@ -3938,6 +3940,8 @@ and elabDecl (dAll as (d, loc), (env, denv, gs)) =
end
| NONE =>
let
+ val () = if !verbose then TextIO.print ("CHECK: " ^ x ^ "\n") else ()
+
val () = if x = "Basis" then
raise Fail "Not allowed to redefine structure 'Basis'"
else
@@ -4680,7 +4684,7 @@ fun elabFile basis basis_tm topStr topSgn top_tm env file =
val c = normClassKey env c
in
case resolveClass env c of
- SOME _ => raise Fail "Type class resolution succeeded unexpectedly"
+ SOME _ => ()
| NONE => expError env (Unresolvable (loc, c))
end)
gs)