Finish the sized primitives work
For a long time GHC had no first-class sized integer types. While Word8
existed, it was merely a wrapper around Word#
with the invariant that the value was a byte. This changed in 2c959a18 and 36fcf9ed with the introduction of {Word,Int}{16,32}#
, giving us a full complement of sized integer types.
In !4390 (closed) we adjusted the lifted Data.Int
and Data.Word
types to use their sized unlifted types (e.g. Word8#
) instead of their word-sized brethren (e.g. Word#
). However, this is just the first step of this process. There are a variety of knock-on effects that will also need to be pushed forward,
-
readWord8OffAddr#
and friends still return unsized results (!4492 (closed)) -
indexWord8OffAddr#
and friends still return unsized results (!4492 (closed)) -
writeWord8OffAddr#
and friends still take unsized arguments (!4492 (closed)) -
the type mappings INT_VECTOR_TYPES
andWORD_VECTOR_TYPES
defined inprimops.txt.pp
still used unsized types (!4492 (closed)) -
the ByteArray#
operations still use unsized types (!4492 (closed)) -
we do not use binary operations (e.g. +#
,and#
) for the sized types (!5261 (closed), !5262 (closed), !4717 (merged))
Also
-
64-bit types are annoying to work with because CPP. (!3658 (closed), has its own issues too.)