Mercurial > urweb
diff src/elab_err.sml @ 711:7292bcb7c02d
Made type class system very general; demo compiles
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 09 Apr 2009 12:31:56 -0400 |
parents | 1fb318c17546 |
children | 915ec60592d4 |
line wrap: on
line diff
--- a/src/elab_err.sml Tue Apr 07 20:38:01 2009 -0400 +++ b/src/elab_err.sml Thu Apr 09 12:31:56 2009 -0400 @@ -217,7 +217,17 @@ ("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),