[MLton] Unicode / WideChar

Wesley W. Terpstra terpstra@gkec.informatik.tu-darmstadt.de
Wed, 23 Nov 2005 17:45:23 +0100

On Nov 23, 2005, at 5:39 PM, Wesley W. Terpstra wrote:
> hash(c) = ((c >> 14) * 16837 + c) & 0x7FFF

By the way, you might notice that if MLton kept track of the bit
widths of promoted types (which I still want for 32*32 muls!!!),
then this becomes a simple hash(c) = c for ASCII.

That was on purpose.
Now you will feel my pain too, and add the feature I have
craved since switching to MLton. Right? ;-)

Anyways, your ascii lookup table fits in one contiguous
(small) block of memory.... and no superfluous conditional
was needed to special case the ASCII characters. That's
another reason I don't really want to split the Char1 out.