Skip to content

v16.0.0

Compare
Choose a tag to compare
@Gabriella439 Gabriella439 released this 05 May 01:18
· 211 commits to master since this release
4d7c8e4

Breaking changes:

  • Adjust precedence of === and with

    This includes two precedence changes:

    • with expressions now forbid operators for their left-hand agument

      For example, now these parentheses are required:

      ({ x = 0 }  { y = 1 }) with x = 1

      Previously, if you omitted the parentheses, like this:

      { x = 0 }  { y = 1 } with x = 1

      ... that would have parsed as:

      { x = 0 }  ({ y = 1 } with x = 1)

      ... but now you would get a failed parse if you were to omit the
      parentheses.

      This restriction forbids expressions that might have been ambiguous to
      readers. This is definitely a breaking change, since such expressions were
      previously valid now require explicit parentheses, otherwise they will fail
      to parse.

      Along the same lines, an expression like this:

      record with x.y = {} // { x = 1 }

      ... used to parse as:

      (record with x.y = {}) // { x = 1 }

      ... but now parses as:

      record with x.y = ({} // { x = 1 })

      ... which is a different expression.

      The motivation for the latter change in precedence is to permit right-hand
      sides that contain operators without explicit parentheses, like this:

      record with x.y = 2 + 2
    • The precedence of === is now lower than all of the operators

      The motivation for this change is to that you no longer need to parenthesize
      tests just because they use operators. For example, previously the
      following parentheses were mandatory:

      let example = assert : (2 + 2) === 4

      ... and now you can safely omit the parentheses:

      let example = assert : 2 + 2 === 4

      This part is not a breaking change because any expression affected by this
      change in precedence would not have type-checked anyway.

  • Update encoding of floating point values to RFC7049bis

    This changes how Double literals are encoded to match a new standard
    recommendation how to canonically encode floating point values. Specifically,
    these values are now encoded using the smallest available CBOR representation,
    (which could be half precision floating point values). Previously, the Dhall
    standard would always use at least 32 bits for encoding floating point values
    (except for special values like Infinity or NaN).

    This is a technically breaking change because this affects the computed
    integrity checks for frozen imports, but you are less likely to hit this in
    practice because: (A) usually only Dhall packages containing reusable
    utilities are frozen using integrity checks and (B) there are essentially
    no useful utilities one could write in Dhall using specific Double literals
    since they are opaque.

New features:

Other changes: