Re: Unix.reap (type system obfuscation)

"Vesa Karvonen" <[email protected]> Sat, 26 May 2007 13:18:51 +0300
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
On 5/26/07, brian <briand-/[email protected]> wrote:
> I don't understand.  Is it just me, or are the error messages
> misleading ?
[...]

I think that the error message is fine.  Here is a small program
that has the same bug:

structure X = struct
   val x = 1
end

val () =
    case X.x of
       X.x => ()
     | _   => ()

Can you see the problem now?

-Vesa Karvonen

(Hint 1: Listen to the compiler.  X.x is not a constructor, which
means that ...)
(Hint 2: You need to use = and if-then-else rather than case.)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/