All,
Here's a little wishlist item for those minds more capable than
mine...
I often run into type mismatch errors in deeply nested type terms (see
example below, from some typical broken combinator-based parser
code). I would *love* to have xemacs sml-mode just highlight in red
that I messed up and am trying to pass a DECL_INFO list instead of a
simple DECL_INFO. These messages are just too painful and tedious to
parse and compare by hand! One bright red highlighted term would be
worth a thousand words :-)
The general case would likely be hard, but I'd think that a simple
error message parser with a comparison or unification algorithm would
be able to identify obvious conflicts. The usual errors I see in my
development are of the form shown below, with occasional problems due
to value restriction (can't bind a concrete to a 'Z type).
While I've seen references to stand-alone type error slicing and
various little toy tools, I'm wondering if there is a way to integrate
a simple error message scanner/highlighter into xemacs sml-mode.
Regards,
- Kenn
vparse.sml:1758.12-1761.53 Error: operator and operand don't agree
[tycon mismatch]
operator domain: (VSTREAM
-> (((designator * sym_decl) list * (DECL_INFO *
TYPEDEF))
* VSTREAM) list)
* (VSTREAM
-> (((designator * sym_decl) list
* (DECL_INFO * TYPEDEF)) * VSTREAM) list)
operand: (VSTREAM
-> (((designator * sym_decl) list * (DECL_INFO *
TYPEDEF))
* VSTREAM) list)
* (VSTREAM
-> (((designator * sym_decl) list
* (DECL_INFO list * TYPEDEF)) * VSTREAM)
list)
in expression:
f <$> p_integer_type_definition <exp> <|>
(f <$> p_floating_type_definition <exp>) <|>
p_enumeration_type_definition di <|> p_physical_type_definition
di