[MLton] sequenceUnit vs warnSequenceUnit

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Wed, 27 Jul 2005 20:00:57 +0300


Am I the only one who finds the sequenceUnit annotation a bit "strong". It
is not required by the Definition and, although I haven't type checked the
SML books I have been reading, I think that I've seen many examples where
(non-unit) return values are implicitly ignored in a sequence. For
comparison, OCaml only gives a warning when a value is implicitly ignored
in a sequence. I also think that a warning (rather than an error) would be
more consistent with the "spirit of the Definition", which doesn't require
errors for unused identifiers nor for non-exhaustive or redundant matches.