[MLton] Overflow Exception
Matthew Fluet
fluet@cs.cornell.edu
Thu, 16 Sep 2004 09:16:09 -0400 (EDT)
> > Are you by chance using the SMLNJ-Lib? In the BitArray implementation,
> > there is a maxLen computation given by:
> > val maxLen = 8*Word8Array.maxLen
> > This is fine in SML/NJ where Word8Array.maxLen is 16777215, but in MLton,
> > Word8Array.maxLen = valOf(Int.maxInt), so the computation overflows. I
> > replaced the code by:
> > val maxLen = (8*Word8Array.maxLen)
> > handle Overflow => Word8Array.maxLen
>
> Another excellent reason why we should distribute (either as part of
> our release or as a separate tgz) a version of SMLNJ-Lib ported to
> MLton.
I advocate doing so as a separate tgz.