v0.15.5
New features:
-
Increases the max number of typed holes displayed from 5 up to 30 (#4341 by @JordanMartinez)
-
Add a compiler optimization for
ST
functions with up to 10 arity, similar toEffect
optimizations. (#4386 by @mikesol) -
Enable the compiler to derive
Foldable
andTraversable
instances (#4392 by @rhendric)These instances follow the same rules as derived
Functor
instances.
For details, see the PureScript language reference.
Bugfixes:
-
Qualify references to expressions floated to the top level of a module by the compiler (#4364 by @rhendric)
-
Fix replicated type hole suggestions due to malformed source spans (#4374 by @purefunctor)
In PureScript
0.15.4
, the following code will produce multiple entries in
the type hole suggestions. This is due to malformed source spans that are
generated when desugaring value declarations into case expressions.module Main where data F = X | Y f :: forall a. F -> a -> a f X b = ?help f Y b = ?help
-
Improve error spans for class and instance declarations (#4383 and #4391 by @purefunctor and @rhendric)
This improves the error spans for class and instance
declarations. Instead of highlighting the entire class or instance
declaration whenUnknownName
is thrown, the compiler now
highlights the class name and its arguments.Before:
[1/2 UnknownName] 5 class G a <= F a ^^^^^^^^^^^^^^^^ Unknown type class G [2/2 UnknownName] 7 instance G a => F a ^^^^^^^^^^^^^^^^^^^ Unknown type class G
After:
[1/2 UnknownName] 5 class G a <= F a ^^^ Unknown type class G [2/2 UnknownName] 7 instance G a => F a ^^^ Unknown type class G
-
Fix a bug where the compiler did not consider interactions of all functional dependencies in classes. (#4195 by @MonoidMusician)
In particular, combinations of multiple parameters determining other parameter(s) were not handled properly,
affecting overlapping instance checks and the selection of which parameters are fully determined.
Other improvements:
- Bump actions environment to
macOS-11
(#4372 by @purefunctor)
Internal:
-
Enable
OverloadedRecordDot
extension throughout codebase (#4355 by @JordanMartinez) -
Ensure order of args remain unchanged in
freeTypeVariables
(#4369 by @JordanMartinez) -
Bump HLint to version 3.5 and address most of the new hints (#4391 by @rhendric)
-
Remove
purescript-cst
from Makefile (#4389 by @ptrfrncsmrph) -
Bump depend NPM purescript-installer to ^0.3.1 (#4353 by @imcotton)
-
Remove base-compat as a dependency (#4384 by @purefunctor)