comparison src/elab_err.sml @ 849:e571fb150a9f

Fix a bug in type class enrichment from substructures
author Adam Chlipala <adamc@hcoop.net>
date Tue, 16 Jun 2009 14:38:01 -0400
parents cb30dd2ba353
children 1c2f335297b7
comparison
equal deleted inserted replaced
848:e8594cfa3236 849:e571fb150a9f
216 (ErrorMsg.errorAt loc "Type class wildcard occurs out of context"; 216 (ErrorMsg.errorAt loc "Type class wildcard occurs out of context";
217 Option.app (fn (e, c) => eprefaces' [("Function", p_exp env e), 217 Option.app (fn (e, c) => eprefaces' [("Function", p_exp env e),
218 ("Type", p_con env c)]) co) 218 ("Type", p_con env c)]) co)
219 | Unresolvable (loc, c) => 219 | Unresolvable (loc, c) =>
220 (ErrorMsg.errorAt loc "Can't resolve type class instance"; 220 (ErrorMsg.errorAt loc "Can't resolve type class instance";
221 eprefaces' [("Class constraint", p_con env c)(*, 221 eprefaces' [("Class constraint", p_con env c),
222 ("Class database", p_list (fn (c, rules) => 222 ("Class database", p_list (fn (c, rules) =>
223 box [P.p_con env c, 223 box [P.p_con env c,
224 PD.string ":", 224 PD.string ":",
225 space, 225 space,
226 p_list (fn (c, e) => 226 p_list (fn (c, e) =>
227 box [p_exp env e, 227 box [p_exp env e,
228 PD.string ":", 228 PD.string ":",
229 space, 229 space,
230 P.p_con env c]) rules]) 230 P.p_con env c]) rules])
231 (E.listClasses env))*)]) 231 (E.listClasses env))])
232 | IllegalRec (x, e) => 232 | IllegalRec (x, e) =>
233 (ErrorMsg.errorAt (#2 e) "Illegal 'val rec' righthand side (must be a function abstraction)"; 233 (ErrorMsg.errorAt (#2 e) "Illegal 'val rec' righthand side (must be a function abstraction)";
234 eprefaces' [("Variable", PD.string x), 234 eprefaces' [("Variable", PD.string x),
235 ("Expression", p_exp env e)]) 235 ("Expression", p_exp env e)])
236 236