comparison src/elab_err.sml @ 706:1fb318c17546

Enhance table sig item support and get demo compiling again
author Adam Chlipala <adamc@hcoop.net>
date Tue, 07 Apr 2009 15:04:07 -0400
parents 12b73f3c108e
children 7292bcb7c02d
comparison
equal deleted inserted replaced
705:e6706a1df013 706:1fb318c17546
326 datatype str_error = 326 datatype str_error =
327 UnboundStr of ErrorMsg.span * string 327 UnboundStr of ErrorMsg.span * string
328 | NotFunctor of sgn 328 | NotFunctor of sgn
329 | FunctorRebind of ErrorMsg.span 329 | FunctorRebind of ErrorMsg.span
330 | UnOpenable of sgn 330 | UnOpenable of sgn
331 | NotType of kind * (kind * kind * kunify_error) 331 | NotType of ErrorMsg.span * kind * (kind * kind * kunify_error)
332 | DuplicateConstructor of string * ErrorMsg.span 332 | DuplicateConstructor of string * ErrorMsg.span
333 | NotDatatype of ErrorMsg.span 333 | NotDatatype of ErrorMsg.span
334 334
335 fun strError env err = 335 fun strError env err =
336 case err of 336 case err of
342 | FunctorRebind loc => 342 | FunctorRebind loc =>
343 ErrorMsg.errorAt loc "Attempt to rebind functor" 343 ErrorMsg.errorAt loc "Attempt to rebind functor"
344 | UnOpenable sgn => 344 | UnOpenable sgn =>
345 (ErrorMsg.errorAt (#2 sgn) "Un-openable structure"; 345 (ErrorMsg.errorAt (#2 sgn) "Un-openable structure";
346 eprefaces' [("Signature", p_sgn env sgn)]) 346 eprefaces' [("Signature", p_sgn env sgn)])
347 | NotType (k, (k1, k2, ue)) => 347 | NotType (loc, k, (k1, k2, ue)) =>
348 (ErrorMsg.errorAt (#2 k) "'val' type kind is not 'Type'"; 348 (ErrorMsg.errorAt loc "'val' type kind is not 'Type'";
349 eprefaces' [("Kind", p_kind env k), 349 eprefaces' [("Kind", p_kind env k),
350 ("Subkind 1", p_kind env k1), 350 ("Subkind 1", p_kind env k1),
351 ("Subkind 2", p_kind env k2)]; 351 ("Subkind 2", p_kind env k2)];
352 kunifyError env ue) 352 kunifyError env ue)
353 | DuplicateConstructor (x, loc) => 353 | DuplicateConstructor (x, loc) =>