[Haskell-cafe] How to use an crypto with hackage cereal?

Yitzchak Gale gale at sefer.org
Thu Apr 23 08:46:24 UTC 2015


Ivan Lazar Miljenovic wrote:
>>> Except that binary and cereal are for serializing Haskell values
>>> directly; you seem to be wanting to parse and generate a particular
>>> encoding for a value.  In which case, I don't think binary or cereal
>>> is really appropriate.

> I meant "encode" as in "use a specific representation rather than
> directly converting it on a constructor-by-constructor basis as is the
> default for Get/Put".

I must still not be understanding what you meant in your
original comment. Because in my view, cereal and binary are
*exactly* designed for that use, and do it extremely well.

The only place where a particular "constructor-by-constructor"
approach is built in is in the facilities for automated generation
of parsers using generic techniques. But when writing parsers
directly, you have full flexibility, and a powerful set of
built-in tools to back you up.


More information about the Haskell-Cafe mailing list