[MLton] Word<N>

Stephen Weeks MLton@mlton.org
Tue, 15 Mar 2005 13:13:18 -0800

> I do everything is Word8 and make sure I only use one bit.

One advantage of "datatype word1 = W0 | W1" is that MLton can tell
that only one bit of storage is needed to represent a value of type
word1.  This might save some space in a packed record.  Unfortunately,
because MLton doesn't support array elements smaller than one byte,
there is no advantage for word1 arrays, as either approach will
require one byte per element.