purescript v0.14.1 Release Notes

  • ๐Ÿ†• New features:

    • ๐Ÿ‘Œ Support TCO for functions with tail-recursive inner functions (#3958, @rhendric)

    Adds support for optimizing functions that contain local functions which call the outer function in tail position, as long as those functions themselves are only called from tail position, either in the outer function or in other such functions.

    This enables hand-written mutually-tail-recursive function groups to be optimized, but more critically, it also means that case guards which desugar to use local functions don't break TCO.

    • โž• Add warnings for unused names and values (#3819, @nwolverson)

    The compiler now emits warnings when it encounters unused names in binders and unused value declarations. A declaration is considered to be unused if it is not exported and is also not reachable by any of the exported declarations. The compiler will not currently produce unused warnings about other kinds of declarations such as data and type class declarations, but we intend to produce warnings for these in the future as well.

    ๐Ÿ›  Bugfixes:

    • ๐Ÿ–จ Make close punctuation printable in errors (#3982, @rhendric)
    • Desugar type operators in top-level kind signatures (#4027, @natefaubion)
    • ๐Ÿ‘‰ Use type annotation hint only when needed (#4025, @rhendric)
    • ๐Ÿ›  Fix pretty printing of "hiding" imports (#4058, @natefaubion)

    • Instantiate polymorphic kinds when unwrapping newtypes while solving Coercible constraints (#4040, @kl0tl)

    • ๐Ÿ›  Fix row unification with shared unknown in tails (#4048, @rhendric)

    • ๐Ÿ›  Fix kinded declaration reordering in desugaring (#4047, @rhendric)

    • ๐Ÿ›  Fix wildly off kind unification positions (#4050, @natefaubion)

    • ๐Ÿ›  Fix incorrect incremental builds with different --codegen options (#3911, #3914, @hdgarrood)

    This bug meant that after invoking the compiler with different --codegen options, it was easy to end up with (for example) an outdated docs.json or corefn.json file in your output directory which would be incorrectly considered up-to-date by the compiler.

    Other improvements:

    • โž• Add white outline stroke to logo in README (#4003, @ptrfrncsmrph)

    The previous logo.png was not legible against a dark background (#4001).

    • ๐Ÿ‘‰ Show the constraints that were being solved when encountering a type error (@nwolverson, #4004)

    • โœ‚ Removed all shift/reduce conflicts in parser (#4063, @JordanMartinez).

    Happy defaults to using "shift" rather than "reduce" in shift/reduce conflicts. This change merely makes explicit what is already happening implicitly.

    Internal:

    • โฌ†๏ธ Upgrade tests Bower dependencies (#4041, @kl0tl)
    • โœ‚ Remove unused Data.Foldable.foldr import (#4042, @kl0tl)