summaryrefslogtreecommitdiff
path: root/src/elab_err.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-09 12:31:56 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-09 12:31:56 -0400
commita75aaa90b3b827f9ef002491bc081df36260f136 (patch)
treedddbb02bac0b5dae304255f3ba1f8f95d7af21a6 /src/elab_err.sml
parented34aa061c7d9ba68d8f2419b22c2a0b6b6ce812 (diff)
Made type class system very general; demo compiles
Diffstat (limited to 'src/elab_err.sml')
-rw-r--r--src/elab_err.sml12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/elab_err.sml b/src/elab_err.sml
index 4f24e225..172f7d37 100644
--- a/src/elab_err.sml
+++ b/src/elab_err.sml
@@ -217,7 +217,17 @@ 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)])
+ 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))])
| IllegalRec (x, e) =>
(ErrorMsg.errorAt (#2 e) "Illegal 'val rec' righthand side (must be a function abstraction)";
eprefaces' [("Variable", PD.string x),