Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class Binary x => BinaryRep x a | a -> x where Source #
fromBinaryRep :: x -> Either String a Source #
toBinaryRep :: a -> x Source #
Instances
(Binary x, Integral x, Bounded a, Enum a) => BinaryRep x (ViaBoundedEnum x a) Source # | |
Defined in Dahdit.BinaryRep fromBinaryRep :: x -> Either String (ViaBoundedEnum x a) Source # toBinaryRep :: ViaBoundedEnum x a -> x Source # | |
(Binary x, Integral x, Integral a) => BinaryRep x (ViaIntegral x a) Source # | |
Defined in Dahdit.BinaryRep fromBinaryRep :: x -> Either String (ViaIntegral x a) Source # toBinaryRep :: ViaIntegral x a -> x Source # |
newtype ViaBoundedEnum x a Source #
Instances
(Binary x, Integral x, Bounded a, Enum a) => BinaryRep x (ViaBoundedEnum x a) Source # | |
Defined in Dahdit.BinaryRep fromBinaryRep :: x -> Either String (ViaBoundedEnum x a) Source # toBinaryRep :: ViaBoundedEnum x a -> x Source # |
newtype ViaIntegral x a Source #
ViaIntegral | |
|
Instances
(Binary x, Integral x, Integral a) => BinaryRep x (ViaIntegral x a) Source # | |
Defined in Dahdit.BinaryRep fromBinaryRep :: x -> Either String (ViaIntegral x a) Source # toBinaryRep :: ViaIntegral x a -> x Source # |
newtype ViaBinaryRep x a Source #
Instances
BinaryRep x a => Binary (ViaBinaryRep x a) Source # | |
Defined in Dahdit.BinaryRep byteSize :: ViaBinaryRep x a -> ByteCount Source # get :: Get (ViaBinaryRep x a) Source # put :: ViaBinaryRep x a -> Put Source # | |
(StaticByteSized x, BinaryRep x a) => StaticByteSized (ViaBinaryRep x a) Source # | |
Defined in Dahdit.BinaryRep type StaticSize (ViaBinaryRep x a) :: Nat Source # staticByteSize :: Proxy (ViaBinaryRep x a) -> ByteCount Source # | |
type StaticSize (ViaBinaryRep x a) Source # | |
Defined in Dahdit.BinaryRep |