fay v0.20.0.0 Release Notes
Release Date: 2014-04-29 // almost 10 years ago-
โ Adds support for LambdaCase and MultiWayIf
๐ Modules have moved around a lot and several modules have been un-exposed. From now on you will probably only need to deal with at most
Fay
(which re-exports a lot of things),Fay.Config
,Fay.Types.CompileError
,Fay.Convert
, andFay.Types.CompileResult
. Please let us know if you would like us to expose more thingsConfig:
CompileConfig
has been renamed toConfig
and is now located inFay.Config
.CompileConfig
has become a temporary type alias forConfig
.Fay.Compiler.Config
is deprecated, importFay
orFay.Config
instead.- The
data-default
instance forConfig
is deprecated, usedefaultConfig
instead.
compiling
compileFileWithState
is deprecated, usecompileFileWithResult
which returns aFay.Types.CompileResult
instead. As a consequenceCompileState
is also deprecated from public consumption.compileFile
,compileFromToAndGenerateHtml
no longer return a triple with the sourcemap, usecompileFileWithResult
if you want access to this.
๐ Importing
Fay.Types
has been deprecated, importFay
instead.readFromFay
has been rewritten usingsyb
instead ofpretty-show
(Thanks to Michael Sloan and Chris Done)- This introduces the following breaking changes:
readFromFay
has aData
constraint instead ofShow
.- 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:
- You can now write custom
Show
instances targeting GHC for types shared with Fay. - Better performance.
- 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.
(\f x -> maybe (f x) myIntegerToValueConversion (cast x))
and likewise to decodeFay.
๐ Bugfixes:
- Mltiple guards on a pattern in a case expression skipped everything but the first guard. To fix this an optimization we had on pattern conditions was disabled.
Dependency bumps:
- ๐ Allow Cabal 1.20 and 1.21
Internal:
- ๐ Test cases are now using
tasty
instead oftest-framework
. To run cases in parallel usefay-tests --num-threads=N
(seefay-tests --help
for more info). - โ Added a test group for desugaring.