github tweag/nickel 1.0.0

latest releases: 1.8.1, 1.8.0, 1.7.0...
18 months ago

Version 1.0

This is the 1.0 release! The syntax and the semantics of the core language have
been stabilized and shouldn't evolve as much in the future.

  • The core semantics of the language have been reworked and stabilized, in
    particular (but not limited to) merging, types and contracts with the
    implementation of RFC005
  • The stdlib has been augmented with many new functions
  • Parts of the syntax and some builtin symobls (types, stdlib functions, and so
    on) have been improved and made consistent
  • New features for the LSP, and in particular code completion

Breaking changes

  • Various functions from the stdlib have been renamed for better discoverability,
    and the stdlib got a lot of new additions. Please refer to the documentation
    of the stdlib.
  • String functions are now unicode-aware, and operate on the Unicode grapheme
    cluster abstraction instead of the character abstraction (string.length,
    string.is_match, etc.)
  • The switch keyword has been replaced by match, and can now be used as a
    standalone function (doesn't need to be applied right away)
  • The Num and Str builtin types have been renamed to Number and String by @yannham in #1164
  • The num and str stdlib modules have been renamed to number and string
  • The builtin.typeof function now returns 'Number, 'String, 'Function
    instead of respectively 'Num, 'Str, and 'Fun
  • The builtin.is_num, builtin.is_str and builtin.to_str functions have been
    renamed to is_number, is_string and to_string
  • The string.to_num and string.from_num functions have been renamed to
    to_number and from_number
  • All the stdlib modules array, string, record, etc. have been put
    under a std namespace. They must now be accessed as std.array,
    std.string and so on.
  • RFC005 was implemented, which changes the semantics of contract annotations
    and merging. See the RFC
    content

    for more details. Most notably, metadata annotation (default values,
    optional, documentation, etc.) can only appear next to a record field.
    Contract and type annotations can still appear anywhere. Documentation can
    still appear on let-bindings.
  • Use static dictionary types for record.fields and record.values by @matthew-healy in #1024
  • Make type annotations to not propagate through merging by @yannham in #1271
  • Change to dictionary contracts and introduction of a separate dictionary contract (in addition to dictionary type):
  • Stdlib string.Stringingable -> string.Stringable by @vkleen in #1180
  • Fix the type of array.elem by @yannham in #1223
  • Change the enum tag start delimiter from backtick to single-quote by @vkleen in #1279
  • import is now a statement, import "foo.ncl" arg1 arg2 requires parenthesis now: (import "foo.ncl") arg1 arg2, see #1293

Language features

  • Symbolic strings by @matthew-healy in #994
  • [RFC005] Lazy propagation by @yannham in #1086
  • Non-exported record fields by @vkleen in #1132
  • Enrich label custom reporting data by @yannham in #1152
  • Use type annotations in record patterns during typechecking by @matthew-healy in #1176
  • Use arbitrary precision rationals as the underlying representation of numbers by @yannham in #1182
  • Allow equal arrays to be merged in order to make merge idempotent by @yannham in #1229
  • Use deterministic hashtables, making runtime errors and typechecking error deterministic by @yannham in #1235

Stdlib

  • Add a %trace% primop (and std.trace function) by @vkleen in #1055
  • Add std.contract.Equal contract to the stdlib by @yannham in #1203

Tooling

  • Display meta information when providing completion in #966
  • LSP completion for import terms by @ebresafegaga in #993
  • Fix LSP server not giving completion when a non-contract meta-information is present in a declaration by @ebresafegaga in #991
  • Fix LSP not giving completion when an identifier is prefixed by a delimiting character by @ebresafegaga in #1043
  • Improve the "goto definition" feature of the LSP by making it work across multiple files by @ebresafegaga in #1029
  • Add --color option to the CLI by @matthew-healy in #1033
  • Make the "find references" feature of the LSP work across multiple files by @ebresafegaga in #1037
  • Add support for LSP completion using the surrounding context by @ebresafegaga (context completion) in #1057
  • Support completion for field names inside recursive records. by @ebresafegaga in #1088
  • Improve contract violation error reporting by @ebresafegaga in #1139
  • Add a JSON documentation export option by @vkleen in #1209
  • Add support for formatting capabilities to the LSP by @ebresafegaga in #1216

Don't miss a new nickel release

NewReleases is sending notifications on new releases.