bool8

Alternative Bool type stored as byte

Latest on Hackage:0.0.1.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Henning Thielemann
Maintained by [email protected]

The standard Bool type has a Storable instance that requires the size of HTYPE_INT, i.e. usually four bytes or even more. This package provides Bool8, a boolean type with an 8 bit representation in memory. It is not a drop-in replacement for Bool though. You have to convert from or to Bool occasionally.

Starting with GHC-8.2/base-4.10 you also have Foreign.C.Types.CBool.