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, and Fay.Types.CompileResult. Please let us know if you would like us to expose more things

    • Config:

      • CompileConfig has been renamed to Config and is now located in Fay.Config.
      • CompileConfig has become a temporary type alias for Config.
      • Fay.Compiler.Config is deprecated, import Fay or Fay.Config instead.
      • The data-default instance for Config is deprecated, use defaultConfig instead.
    • compiling

      • compileFileWithState is deprecated, use compileFileWithResult which returns a Fay.Types.CompileResult instead. As a consequence CompileState is also deprecated from public consumption.
      • compileFile, compileFromToAndGenerateHtml no longer return a triple with the sourcemap, use compileFileWithResult if you want access to this.
    • ๐Ÿ—„ Importing Fay.Types has been deprecated, import Fay instead.

    • readFromFay has been rewritten using syb instead of pretty-show (Thanks to Michael Sloan and Chris Done)

      • This introduces the following breaking changes:
      • readFromFay has a Data constraint instead of Show.
      • 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 of test-framework. To run cases in parallel use fay-tests --num-threads=N (see fay-tests --help for more info).
    • โž• Added a test group for desugaring.