HORIZON HASKELLDocslts/ghc-10.0.xa8896112026-10-18Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · a889611 · 2026-10-18

Modulehnix-store-remote-0.7.0.0Haskell2010

Data.Serializer

Serializer ties Get and PutM monads into a single datatype and allows transforming both monads with a monad transformer for adding extra layers like ExceptT (for example when putS can fail due to unsupported version of a protocol) or ReaderT (when we need to serialize a data type based differently based on a protocol version).

See Data.Serializer.Example

  • 5 types
  • 11 values

Serializer

1 declaration
datadata Serializer (t :: (Type -> Type) -> Type -> Type) a
#

Serializer ties Get and PutM monads into a single datatype and allows transforming the monads with a monad transformer for e.g. adding ExceptT or ReaderT layers.

Constructors

Runners

Simple serializer

1 declaration

Simple runners

From Get/Put, Serialize

2 declarations

Combinators

3 declarations

Utility

3 declarations
datadata GetSerializerError customGetError
#

Wrapper for both GetS errors

  • the one that occurs when fail is called

  • custom one when ExceptT is used

Instances3Eq, Ord, Show

Re-exports

2 declarations
newtypenewtype Get a
#

The Get monad is an Exception and State monad.

Instances6Monad, Functor, MonadFail, Applicative, Alternative, MonadPlus
  • Monad GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
  • Functor GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
  • MonadFail GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
  • Applicative GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
  • Alternative GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
  • MonadPlus GetDefined in cereal-0.5.8.3 · Data.Serialize.Get
newtypenewtype PutM a
#

The PutM type. A Writer monad over the efficient Builder monoid.

Instances5Monad, Functor, Applicative, Semigroup, Monoid
  • Monad PutMDefined in cereal-0.5.8.3 · Data.Serialize.Put
  • Functor PutMDefined in cereal-0.5.8.3 · Data.Serialize.Put
  • Applicative PutMDefined in cereal-0.5.8.3 · Data.Serialize.Put
  • Semigroup (PutM ())Defined in cereal-0.5.8.3 · Data.Serialize.Put
  • Monoid (PutM ())Defined in cereal-0.5.8.3 · Data.Serialize.Put