serdoc-core-0.1.0.0: Generated documentation of serialization formats
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SerDoc.TH

Synopsis

Documentation

deriveSerializable :: Name -> [Name] -> Name -> DecsQ Source #

Derive a Serializable instance for the given codec and type. Currently only supports record types. The generated instance will serialize record fields in the order they are declared in the source code, without any additional separators, padding, or envelope around or between them, making it compatible with deriveHasInfo. (See also deriveSerDoc.)

deriveHasInfo :: Name -> [Name] -> Name -> DecsQ Source #

Derive a HasInfo instance for the given codec and type. Currently only supports record types. A matching Serializable instance must serialize record fields in the order they are declared in the source code, without any additional separators, padding, or envelope around or between them. If your serializer does not meet these requirements, you must write a custom HasInfo instance instead.

deriveSerDoc :: Name -> [Name] -> Name -> DecsQ Source #

Derive both a HasInfo instance and a matching Serializable instance, combining deriveHasInfo and deriveSerializable.