This introduces the following breaking changes to Fay.Convert:
readFromFay now has a Data constraint instead of Show
Aeson support has been changed to instead of use explicit parsers for ints/integers/etc, just use Aeson's own parsers. This avoids needing separate CPP #ifdefs for <0.7 and >=0.7.
Drops support for Rational and Integer (see below for migration steps). The reason is that neither was serialized in a way that would roundtrip for all values. Also, for similar reasons, fromRational is potentially divergent for aeson's new use of the Scientific type.
And adds the following features:
Better performance due to now using syb instead of parsing the results of show.
Allows the serialization and deserialization to be customized on a per-type basis, via encodeFay and decodeFay.
To migrate code using Rational or Integer, use encodeFay and pass an argument e.g. something like
(\f x -> maybe (f x) myIntegerToValueConversion (cast x))
This introduces the following breaking changes to
Fay.Convert
:readFromFay
now has aData
constraint instead ofShow
#ifdef
s for<0.7
and>=0.7
.Rational
andInteger
(see below for migration steps). The reason is that neither was serialized in a way that would roundtrip for all values. Also, for similar reasons,fromRational
is potentially divergent for aeson's new use of theScientific
type.And adds the following features:
show
.encodeFay
anddecodeFay
.To migrate code using Rational or Integer, use
encodeFay
and pass an argument e.g. something likeand likewise to
decodeFay
.