module HaskellWorks.Data.Bits.FixedBitSize
( FixedBitSize(..)
) where
import Data.Word
import HaskellWorks.Data.Positioning
class FixedBitSize a where
fixedBitSize :: a -> Count
instance FixedBitSize Bool where
fixedBitSize :: Bool -> Count
fixedBitSize Bool
_ = Count
1
instance FixedBitSize Word8 where
fixedBitSize :: Word8 -> Count
fixedBitSize Word8
_ = Count
8
instance FixedBitSize Word16 where
fixedBitSize :: Word16 -> Count
fixedBitSize Word16
_ = Count
16
instance FixedBitSize Word32 where
fixedBitSize :: Word32 -> Count
fixedBitSize Word32
_ = Count
32
instance FixedBitSize Word64 where
fixedBitSize :: Count -> Count
fixedBitSize Count
_ = Count
64