Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ml > Can you get sml...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 929 of 968
Post > Topic >>

Can you get sml-mode to highlight type mismatch terms?

by kennheinrich@[EMAIL PROTECTED] Oct 1, 2007 at 07:47 PM

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
 




 7 Posts in Topic:
Can you get sml-mode to highlight type mismatch terms?
kennheinrich@[EMAIL PROTE  2007-10-01 19:47:58 
Re: Can you get sml-mode to highlight type mismatch terms?
dbenson@[EMAIL PROTECTED]  2007-10-03 09:57:13 
Re: Can you get sml-mode to highlight type mismatch terms?
kennheinrich@[EMAIL PROTE  2007-10-04 08:12:54 
Re: Can you get sml-mode to highlight type mismatch terms?
dbenson@[EMAIL PROTECTED]  2007-10-15 23:04:07 
Re: Can you get sml-mode to highlight type mismatch terms?
Vesa Karvonen <vesa.ka  2007-10-15 23:05:03 
Re: Can you get sml-mode to highlight type mismatch terms?
Stefan Monnier <monnie  2007-10-17 17:26:34 
Re: Can you get sml-mode to highlight type mismatch terms?
Vesa Karvonen <vesa.ka  2007-10-18 16:50:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:40:45 CDT 2008.