diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-05-04 10:33:04 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-05-04 10:33:04 -0400 |
commit | 802fc606ff18c261eb591d7ae6dbb99fe9c48af9 (patch) | |
tree | e52dfe5be4f5e8033c784ee197b5980006771472 /src/elab_err.sml | |
parent | 75fa1fd2ad8aae9a88dfacd1a85eb80f645a3b74 (diff) |
More diagnostic information about some type class resolution failures
Diffstat (limited to 'src/elab_err.sml')
-rw-r--r-- | src/elab_err.sml | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/elab_err.sml b/src/elab_err.sml index f21ddce0..0e04cf51 100644 --- a/src/elab_err.sml +++ b/src/elab_err.sml @@ -239,17 +239,10 @@ fun expError env err = ("Type", p_con env c)]) co) | Unresolvable (loc, c) => (ErrorMsg.errorAt loc "Can't resolve type class instance"; - eprefaces' [("Class constraint", p_con env c)(*, - ("Class database", p_list (fn (c, rules) => - box [P.p_con env c, - PD.string ":", - space, - p_list (fn (c, e) => - box [p_exp env e, - PD.string ":", - space, - P.p_con env c]) rules]) - (E.listClasses env))*)]) + eprefaces' ([("Class constraint", p_con env c)] + @ (case E.resolveFailureCause () of + NONE => [] + | SOME c' => [("Reduced to unresolvable", p_con env c')]))) | IllegalRec (x, e) => (ErrorMsg.errorAt (#2 e) "Illegal 'val rec' righthand side (must be a function abstraction)"; eprefaces' [("Variable", PD.string x), |