github tweag/nickel 0.2.0

latest releases: 1.8.1, 1.8.0, 1.7.0...
2 years ago

Version 0.2 (2022-07-29)

Breaking changes

  • Using a contract as part of a static type annotation will in most cases fail with an appropriate error message. This is a temporary limitation in order to fix previously unsound behavior in the typechecker. This restriction will likely be lifted in the upcoming 0.3.x release.
    For more details, see issues #701 and #724

Fixes

  • Fix unnecessarily restricted record contract for record.update
  • Fix wrong interpretation of long interpolation-like sequences %..%{ in strings
  • Fix panic when evaluating a switch in specific cases
  • Fix fields without definition being assigned to null, instead of just being marked as undefined

Language features

  • Merging null values together gives null, and merging empty lists together gives an empty list, instead of failing with error: non mergeable terms
  • Add recursive let-bindings (let rec)
  • Add type wildcards. Use _ in place of a type to let the typechecker fill
    the gap. Example: let foo : _ = array.all ((==) 2) [1,2,3]
  • Add builtin.to_str and string.from to convert generic values to a string
  • Re-introduce an official syntax for enum types

Tooling

  • Add the nickel pprint-ast command to pretty print a parsed program (mostly for debugging purpose)
  • Add the nickel doc command to produce simple markdown documentation from the in-code doc metadata

Documentation

  • Fix various typos and remove use of deprecated syntax in the user manual

Don't miss a new nickel release

NewReleases is sending notifications on new releases.