| Portability | non-portable |
|---|---|
| Stability | experimental |
| Maintainer | generics@haskell.org |
Generics.Regular.Functions.Binary
Contents
Description
Generic Data.Binary instances.
These generic functions can be used to create a Data.Binary instance. For
example, for a user-defined type MyType, the following code is necessary:
import Data.Binary import Generics.Regular.Base import Generics.Regular.Binary data MyType = ... $(deriveAll ''MyType "PFMyType") type instance PF MyType = PFMyType instance Binary MyType where put = gput get = gget