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.
Bug fixes
-
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.