github purescript/purescript v0.11.2

latest releases: v0.15.16-4, v0.15.16-3, v0.15.16-2...
7 years ago

New Features

Polymorphic Labels

(@paf31)

A new RowCons constraint has been added to Prim. RowCons is a 4-way relation between

  1. Symbols
  2. Types
  3. Input rows
  4. Output rows

which appends a new label (1) with the specified type (2) onto the front of the input row (3), to generate a new output row (4). The constraint can also be run backwards to subtract a label from an output row.

This allows us to quantify types over labels appearing at the front of a row type, by quantifying over the corresponding symbol/type pair. This gives us a limited form of polymorphic labels which enables things like writing a single lens for any record accessor.

Enhancements

  • Use XDG Base Directory Specification for the location of the psci_history file (@legrostdg)
  • Collect more information for classes and synonyms in purs ide (@kritzcreek)

Bug Fixes

  • Desugar pattern guards after type checking, to avoid an issue with the exhaustivity checker (@alexbiehl)

Other

  • A new PSCi evaluation test suite was added (@noraesae)
  • Use hpack to generate the .cabal file (@kritzcreek)

Don't miss a new purescript release

NewReleases is sending notifications on new releases.