Skip to content

v11.0.0

Compare
Choose a tag to compare
@Gabriella439 Gabriella439 released this 16 Oct 02:26
· 334 commits to master since this release
8098184

Breaking changes:

  • Simplify within record projection

    This change allows the interpreter to simplify an expression like this:

    (r  { x = 1, y = True }).{ x, z }

    ... to this:

    r.{ z }  { x = 1 }

    This is a technically breaking change because it changes the normal form for
    expressions that can be simplified in this way, which in turn perturbs
    their hash if they are protected by a semantic integrity check. However, in
    practice this is unlikely to disrupt your code.

  • Simplify nested record projection

    This change allows the interpreter to simplify an expression like this:

    r.{ x, y, z }.{ x, y }

    ... to this:

    r.{ x, y }

    This is a technically breaking change because it changes the normal form for
    expressions that can be simplified in this way, which in turn perturbs
    their hash if they are protected by a semantic integrity check. However, in
    practice this is unlikely to disrupt your code.

New features:

  • Add support for leading separators

    Record literals, record types, and union types all now support leading
    separators, like this:

    { , x = 1, y = True }
    
    { , x : Natural, y : Bool }
    
    < | x : Natural | y : Bool >

    ... which are more commonly used when formatting a multi-line expression so
    that you can always add/remove entries with only a single-line change.

    let example = {
          , x = 1
          , y = True
          }
  • Standardize support for record completion

    This adds a new operator:

    T::r

    ... which is syntactic sugar for:

    (T.default  r) : T.Type

    The motivation for this change is to handle configuration formats with a large
    number of defaultable fields so that users can omit any default-valued fields
    when creating a record:

    let Example =
          { Type = { foo : Text, bar : Optional Natural }
          , default = { bar = None Natural }
          }
    
        -- No need to specify `bar` since it will default to `None Natural`
    in  Example::{ foo = "ABC" }
  • Improved Windows support for caching

    Interpreters will now use Windows-appropriate cache directories
    (i.e. %LOCALAPPDATA%) when available

  • Prelude: Include types in the package.dhall files

    You can now access Prelude.Map.Type, Prelude.JSON.Type and other types
    from the Prelude's package.dhall

  • Prelude: Add List.{default,empty}, Map.empty, Optional.default

    This adds the following new Prelude utilities:

    Prelude.List.default
      : (a : Type)  Optional (List a)  List a
    
    Prelude.List.empty
      : (a : Type)  List a
    
    Prelude.Map.empty
      : (k : Type)  (v : Type)  Map k v
    
    Prelude.Optional.default
      : (a : Type)  a  Optional a  a
  • Prelude: Move JSON.key{Text,Value} to Map

    Prelude.JSON.keyText is now also available from Prelude.Map.keyText

    Similarly, Prelude.JSON.keyValue is now also available from
    Prelude.Map.keyValue

Other changes: