[MLton] bug? pattern-matching against value-carrying constructors

Stephen Weeks MLton@mlton.org
Wed, 20 Jul 2005 22:58:02 -0700


> > A simple one-line example is this:
> > 
> >     fun f x = case x of SOME => true | _ => false
> > 
> > When i try to compile this program with MLton 20041109, i get a
> > 12898-line error message ending with "unhandled exception:
> > TypeError".  Is this a bug?
> 
> Yes it is a bug.

I've committed a fix to our CVS.  Compilation now fails with

Error: z.sml 1.21.
  Contructor must be used with argument in pattern: SOME.