[MLton] admits equality

Matthew Fluet fluet@cs.cornell.edu
Fri, 2 Dec 2005 00:01:40 -0500 (EST)


> Would it be more consistent if the type error message for failing to admit 
> equality used the "[...]" convention of other type error messages.  That is, 
> instead of
>
> Error: z.sml 1.16.
>  Type t admits equality in signature but not in structure.
>    not equality: real * _ * _
>
> have
>
> Error: z.sml 1.16.
>  Type t admits equality in signature but not in structure.
>    not equality: [real] * _ * _

On a related note, the type error message for:

structure Bad: sig eqtype 'a t end =
    struct
       type 'a t = {a: (real -> bool), b: int, c: 'a}
    end

might be better given as

Error: z.sml 1.16.
   Type t admits equality in signature but not in structure.
     not equality: {a: [_ -> _], ...}