HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduledata-serializer-0.3.5Haskell2010

Data.Serializer

Serialization monoid and serializable types.

  • 4 types
  • 4 classes
  • 36 values

Serialization monoid

6 declarations
classclass (Semigroup s, Monoid s) => Serializer s where
#

Serialization monoid.

Methods

Instances7Serializer, …
newtypenewtype BinarySerializer
#

A wrapper around the Put monoid (to avoid orphan instances).

Instances5Generic, Semigroup, Monoid, Serializer, Rep
newtypenewtype CerealSerializer
#

A wrapper around the Put monoid (to avoid orphan instances).

Instances5Generic, Semigroup, Monoid, Serializer, Rep

Binary words serialization

valueword :: Serializer s => Word -> s
#

Serialize an unsigned native-sized integer in serializer default byte order.

valuewordL :: Serializer s => Word -> s
#

Serialize an unsigned native-sized integer in little endian.

valuewordB :: Serializer s => Word -> s
#

Serialize an unsigned native-sized integer in big endian.

valuewordH :: Serializer s => Word -> s
#

Serialize an unsigned native-sized integer in host byte order.

valueint16 :: Serializer s => Int16 -> s
#

Serialize a signed 16-bit integer in serializer default byte order.

valueint32 :: Serializer s => Int32 -> s
#

Serialize a signed 32-bit integer in serializer default byte order.

valueint64 :: Serializer s => Int64 -> s
#

Serialize a signed 64-bit integer in serializer default byte order.

valueint :: Serializer s => Int -> s
#

Serialize a signed native-sized integer in serializer default byte order.

valueintL :: Serializer s => Int -> s
#

Serialize a signed native-sized integer in little endian.

valueintH :: Serializer s => Int -> s
#

Serialize a signed native-sized integer in host byte order.

Endian serializers

newtypenewtype LittleEndianSerializer s
#

Serializer wrapper with little endian default byte order.

Instances6Data, Generic, Semigroup, Monoid, Serializer, Rep
newtypenewtype BigEndianSerializer s
#

Serializer wrapper with big endian default byte order.

Instances6Data, Generic, Semigroup, Monoid, Serializer, Rep

Serializable types

10 declarations
classclass Serializable α where
#

Serializable type. put must work under assumption that it will be followed by more output.

Methods

Instances16Serializable, …
classclass Serializable α => SizedSerializable α where
#

Types with fixed serialized size.

Methods

Instances12SizedSerializable, …
classclass RestSerializable α where
#

Serializable type. putRest must work under assumption that it will not be followed by any more output.

Methods

Instances6RestSerializable