HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecereal-0.5.8.3Haskell2010

Data.Serialize

  • 3 classes
  • 5 values
  • Packagecereal-0.5.8.3
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceSerialize.hs

The Serialize class

1 declaration
classclass Serialize t where
#

If your compiler has support for the DeriveGeneric and DefaultSignatures language extensions (ghc >= 7.2.1), the put and get methods will have default generic implementations.

To use this option, simply add a deriving Generic clause to your datatype and declare a Serialize instance for it without giving a definition for put and get.

Methods

  • put :: Putter t

    Encode a value in the Put monad.

  • get :: Get t

    Decode a value in the Get monad

Instances49Serialize, …

Serialize serialisation

5 declarations
valueexpect :: (Eq a, Serialize a) => a -> Get a
#

Perform an action, failing if the read result does not match the argument provided.

Generic deriving

2 declarations
classclass GSerializePut (f :: Type -> Type) where
#

Methods

Instances6GSerializePut
classclass GSerializeGet (f :: Type -> Type) where
#

Methods

Instances6GSerializeGet