| Portability | see LANGUAGE pragmas (... GHC) |
|---|---|
| Stability | experimental |
| Maintainer | nicolas.frisby@gmail.com |
Type.Serialize.Base
Description
Type-level serialization (i.e. type -> type-digit type-level numeral).
Documentation
encode :: Serialize a => a -> TypeSource
Encode uses the cereal package serializer to encode the value and then
uses type-digits to reflect it as a type-level numeral.
serializeType :: Name -> Q [Dec]Source
Generates the Serialize instance corresponding to the serialization of
the type constructor's globally unique name (i.e. TH's NameG).
serializeTypeAsHash :: Name -> Q [Dec]Source
serializeType can result in very large types, so we prefer the
data-hash hash of the NameG's serialization.