records bug

Stephen Weeks MLton@sourcelight.com
Sat, 16 Jun 2001 12:51:22 -0700


> I don't know if you care about these kinds of bugs (I saw the disclaimer),
> but this one bit me today:
> 
> fun f (a, b) = ()
> 
> val _ = f {bogus=1, wrong=2}
> 
> MLton accepts this program; I guess the names of record fields aren't
> checked if the types are compatible.

Yep.  I had forgotten about this.  Anyways, I added in the check for field names
into our working version.  Someday, I'll write a real front end, so I am always
trying to get the type checking code closer to correctness.

> BTW, I just rewote the "Reverse a File" benchmark at the Programming
> Languages Shootout page (Stephen Weeks, I know you've been submitting some
> too!); now mlton is tied for second place overall with o'caml. Nice job!

Cool.  Thanks.

BTW, would it be OK if added links to your mlfptd and sfingerd projects from the
MLton pages?  I'm working on a page of projects using MLton that will go up just
as soon as we release the next version.