-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Simple wrappers around enum types -- -- allowing to serise to/from binary both as values and bitmasks @package binary-enum @version 0.1.0.0 module Data.Binary.Enum -- | we can store Enum values inside values we know how to store, so let newtype BitMap t a -- | Map lets you encode flags compressing distinct eg. packing 8 -- diferent flags per byte BitMap :: [a] -> BitMap t a newtype BitEnc t a -- | t is a store type, you will need to make sure thats your enum fits -- there BitEnc :: a -> BitEnc t a instance (GHC.Enum.Enum a, GHC.Enum.Enum t, Data.Binary.Class.Binary t) => Data.Binary.Class.Binary (Data.Binary.Enum.BitEnc t a) instance (GHC.Enum.Enum a, GHC.Classes.Eq a, GHC.Classes.Eq t, GHC.Num.Num t, GHC.Real.Integral t, Data.Binary.Class.Binary t) => Data.Binary.Class.Binary (Data.Binary.Enum.BitMap t a)