-- 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.2.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 that your enum fits
-- there eg. you want to store Bool as Word64 field `BitEnc
-- Word64 Bool`
BitEnc :: a -> BitEnc t a
instance GHC.Show.Show a => GHC.Show.Show (Data.Binary.Enum.BitMap t a)
instance GHC.Show.Show a => GHC.Show.Show (Data.Binary.Enum.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.Real.Integral t, Data.Binary.Class.Binary t) => Data.Binary.Class.Binary (Data.Binary.Enum.BitMap t a)
instance (GHC.Enum.Enum a, GHC.Enum.Enum t, GHC.Classes.Eq a, GHC.Classes.Eq t, GHC.Num.Num t) => GHC.Enum.Enum (Data.Binary.Enum.BitMap t a)
instance (GHC.Enum.Enum a, GHC.Enum.Enum t, Data.Binary.Class.Binary t) => GHC.Enum.Enum (Data.Binary.Enum.BitEnc t a)