binary-enum-0.1.0.0: Simple wrappers around enum types

Safe HaskellSafe
LanguageHaskell2010

Data.Binary.Enum

Synopsis

Documentation

newtype BitMap t a Source

we can store Enum values inside values we know how to store, so let

Constructors

BitMap [a]

Map lets you encode flags compressing distinct eg. packing 8 diferent flags per byte

Instances

(Enum a, Eq a, Eq t, Num t, Integral t, Binary t) => Binary (BitMap t a) Source 

newtype BitEnc t a Source

Constructors

BitEnc a

t is a store type, you will need to make sure thats your enum fits there

Instances

(Enum a, Enum t, Binary t) => Binary (BitEnc t a) Source