[MLton] -warn-unused true and MLton

Stephen Weeks MLton@mlton.org
Wed, 18 Feb 2004 05:41:18 -0800


> We could use the following idiom:
> 
> (f x; e) ==> let val () = ignore (f x)
>              in e
>              end
> 
> although then I don't see it being much better than
> 
> (f x; e) ==> (ignore (f x); e)
> 
> and also a little more visually cluttered.

I completely agree.  I much prefer "(ignore (f x); e)".  I was
thinking of the case where there are several expressions in sequence,
only some of which return unit.  When translating that to a let, it
would be nice to write "val ()" for the ones that return unit and "val
_" for the ones that don't.