Skip to content

Releases: dhall-lang/dhall-haskell

1.31.0

29 Mar 05:32
c79a569
Compare
Choose a tag to compare
  • Supports version 15.0.0 of the standard
  • BREAKING CHANGE TO THE API: Auto-derive Generic/FromDhall/ToDhall with Template Haskell
    • Now the Dhall.TH.makeHaskell* utilities will include these derived
      instances in the generated declarations
    • This is a breaking change since users were likely already generating these
      instances separately, which will now conflict with the included instances
  • BREAKING CHANGE TO THE API: From/ToDhall no longer takes InterpretOptions argument
    • The types of the autoWith and injectWith methods have changed to
      take an InputNormalizer instead of an InterpretOptions
      • Note that InputNormalizer is a subset of InterpretOptions
    • This is a breaking change to how derived FromDhall / ToDhall instances
      are customized to more closely match how other Haskell packages customize
      derived instances (e.g. aeson with FromJSON / ToJSON)
      • Previously you would customize the behavior globally by passing in
        a top-level InterpretOptions record to autoWith
      • Now you can customize the behavior locally on a per-instance basis
    • This change enables the following change ...
  • Add Dhall.Deriving module for deriving-via helpers
    • Now you can take advantage of the -XDerivingVia language extension to
      customize derived FromDhall/ToDhall instances, like this:
      • deriving (FromDhall, ToDhall) via Codec (SetSingletonConstructors Bare) Name
  • BREAKING CHANGE TO THE LANGUAGE: Match standard with respect to using toMap
    • https://example.com using toMap customHeaders is now a parse error
      and needs to be explicitly parenthesized as
      https://example.com using (toMap customHeaders)
    • The language standard had always required the parentheses, but the Haskell
      implementation was not correctly matching the standard
  • Fix formatting of indented comments containing empty lines
    • dhall format was previously not idempotent when formatting indented
      comments with empty lines
    • Specifically, the formatter kept indenting things further with each
      format, which this change fixes
  • Fix pretty-printer to preserve original numeric literals
    • Now dhall format will preserve numeric literals exactly how you wrote
      them
    • For example, 0xFF will no longer be reformatted as 255
  • Add dhall to-directory-tree support for Maps
    • Maps are now converted to directories (just like records)
  • Add manpage
    • ... mainly for the benefit of people packaging Dhall for various
      distributions
  • Group commands in CLI
    • The command-line --help output now groups commands into useful
      sections
  • Fix numeric parsing for GHCJS
    • The GHCJS backend for Dhall was failing to parse numbers, which this
      change fixes
  • Fixes and improvements to error messages:
  • Fixes and improvements to the haddocks:

1.30.0

15 Feb 05:53
753a326
Compare
Choose a tag to compare

dhall-1.29.0

13 Jan 04:00
7a2f981
Compare
Choose a tag to compare

dhall-1.28.0

06 Dec 03:52
4c7b75b
Compare
Choose a tag to compare

dhall-1.27.0

20 Oct 14:36
7b414d9
Compare
Choose a tag to compare

dhall-1.26.1

25 Sep 04:16
5b136df
Compare
Choose a tag to compare

dhall-1.26.0

12 Sep 03:17
6571095
Compare
Choose a tag to compare

dhall-1.25.0

29 Jul 05:13
d45f3ec
Compare
Choose a tag to compare
  • Supports version 9.0.0 of the standard
  • BREAKING CHANGE: Remove support for old-style List-like Optional literals
    • List-like Optional Literals (i.e. [ 1 ] : Optional Natural) are no
      longer valid
    • See: #1002
  • BREAKING CHANGE: Add support for semi-semantic caching
    • This change significantly improves the performance of imports
    • This change also automatically caches imports without an integrity check
    • This changes several types in Dhall.Import to support this new
      feature
    • See: #1113
  • BREAKING CHANGE: Implement new Unicode braced escape sequence
    • Escape sequences encoding surrogate pairs are no longer valid
    • Instead, characters previously encoded as surrogate pairs can instead be
      encoded as a braced sequence
    • For example: "\uD834\uDD1E" must now be written as "\u{1D11E}"
    • See: #987
    • See: #1104
  • BREAKING CHANGE: Make the type of extract richer:
    • Dhall.extract can now return a detailed error instead of just a Maybe
    • This is a breaking chnage because the type of extract changed
    • See: #1011
  • BREAKING CHANGE: Add support for importing expressions as Location
    • This is a breaking change because a new Location constructor was added
      to ImportMode
    • See: #1019
  • BREAKING CHANGE: Switch Var to use an Int
    • This is a performance improvement, but also a breaking change since the
      Integer in the Var constructor was changed to an Int
    • See: #1044
  • BREAKING CHANGE: Add new toMap keyword
    • This is a breaking change to the API because a new ToMap constructor
      was added to the Expr type
    • This is also a technically breaking change to the language because toMap
      is now a reserved keyword, although most code should be unaffected in
      practice
    • See: #1041
  • BREAKING CHANGE: Sort the fields of a record projection during normalization
    • This is a technically breaking change to the language because any
      expressions with an uninterpreted record projection will have a different
      semantic integrity check. However, most could should be unaffected in
      practice
    • See: #1111
  • BUG FIX: Fix substitution into record projection by type
    • An expression like this one was being incorrectly rejected:
      let e = { a = 10, b = "Text" } let s = { a : Natural } in e.(s), which
      this change fixes
    • See: #1012
  • BUG FIX: Reject record projection when there is a field type mismatch
    • Record projection by type was previously not checking the expected
      field types, which this change fixes
    • See: #1027
  • BUG FIX: Fix linting of unused let bindings
    • Certain let bindings were not correctly detected as unused, which this
      change fixes
    • See: #1001
  • BUG FIX: Fix --file option
    • The --file option from the previous release did not work, due to not
      computing relative paths correctly, which this change fixes
    • See: #1004
  • BUG FIX: Minor fix to dhall diff
    • dhall diff was incorrectly displaying spurious differences for
      identical lists that were function arguments, which this change fixes
    • See: #1006
  • BUG FIX: Allow Sort as type annotation
    • This should have been implemented in the previous release as part of
      supporting version 8.0.0 of the standard, but was missed
    • See: #1024
  • BUG FIX: Dhall.Map: Reflect original key ordering in Ord instance
    • Dhall.Map now considers key order when comparing Maps, which it should
      have done before, but didn't
    • See: #1050
  • BUG FIX: Consistently format multi-line strings
    • The formatter now formats naked multi-line strings the same as nested
      multi-line strings
    • Specifically, naked multi-line strings can now be formatted on a single
      (just like nested multi-line strings)
    • See: #1056
  • BUG FIX: Make isNormalized consistent with normalize
  • BUG FIX: Make normalizeWithM consistent with normalize
  • BUG FIX: Fix import alternatives to recover from type errors
  • Feature: Semi-semantic caching
    • The Haskell implementation now implicitly caches all local imports, not
      just imports frozen by integrity checks, so that you don't have to freeze
      them when doing local development
    • These cached imports are still correctly invalidated if they or any of
      their dependencies change
    • This new implicit cache is stored underneath ~/.cache/dhall-haskell by
      default
    • See: #1154
  • Feature: New dhall text subcommand
    • This new subcommand supersedes the old dhall-to-text executable
  • Feature: Add instance Lift (Expr s a)
  • Fixes and improvements to error messages:
  • Fixes and improvements to tests:
  • Performance improvements

dhall-1.24.0

07 Jun 00:29
fc5b382
Compare
Choose a tag to compare
  • Supports version 8.0.0 of the standard
  • BREAKING CHANGE: Allow tabs and blank lines in multi-line strings
    • Blank lines are now ignored for the purpose of dedenting multiline strings
    • Lines with leading tabs (or mixed tabs and spaces) are now dedented, too,
      so long as they all share the same prefix
    • This is technically a breaking change, but unlikely to affect programs
      in practice, especially if they were formatted with dhall format. This
      change mainly affects programs that were not indented correctly.
    • See the changelog for standard version 8.0.0 for more details
  • BREAKING CHANGE: Simplify bare interpolations
    • Expressions like λ(x : Text) → "${x}" now simplify to λ(x : Text) → x
    • This is a technically breaking change because it changes how these sorts
      of expressions are serialized. This does not affect semantic integrity
      checks and the new simplified expressions are extensionally equivalent to
      their older counterpart expressions.
    • See the changelog for standard version 8.0.0 for more details
  • BREAKING CHANGE: Encode integrity check as multihash
    • Semantic integrity checks are now encoded using the multihash spec
    • This is a technically breaking change that does not perturb the hash for
      user-facing semantic integrity checks. This only affects how expressions
      with unresolved imports are serialized, but semantic integrity checks are
      only computed for fully-resolved imports.
    • See the changelog for standard version 8.0.0 for more details
  • BUG FIX: Fix type-checker to reject invalid record type annotations
    • e.g. { x = 1 } : { x : Text } was not properly rejected by the type
      checker
    • See: #965
  • BUG FIX: Custom header forwarding fixed
    • Forwarding custom headers could previously fail in various ways, such as:
      • Cyclic imports leading to endless network requests
      • Resolving a non-existent import for the custom headers
      • Resolving an existing but incorrect import for the custom headers
    • This change fixes that by forwarding custom headers by value instead of
      by reference
    • See: #967
  • BUG FIX: Fix GHCJS support
    • Natural/fold was broken in version 1.22, which this change fixes
    • Specifically, it would hang for Natural numbers greater than 1
    • See: #985
  • BUG FIX: dhall diff no longer double-prints key-value separators
  • Feature: Record projection by expression
    • You can now project out a subset of record fields by the expected type
    • let t = { x : Natural } let p = { x = 1, y = 2 } in p.(t) = { x = 1 }
    • See the changelog for standard version 8.0.0 for more details
  • Feature: Inline headers
    • You no longer need to specify custom headers in a separate import. You
      can now specify them inline within the same file.
    • e.g.: https://example.com/x using [ { header = "Foo", value = "Bar" } ]
    • See the changelog for standard version 8.0.0 for more details
  • Feature: Allow Sort as a type annotation
    • An expression such as Kind → Kind : Sort will now type-check
    • Sort is still disallowed outside of a type annotation
    • See the changelog for standard version 8.0.0 for more details
  • Feature: Allow self-describe-cbor when decoding
    • Dhall expressions serialized as CBOR can be tagged to describe themselves
      as CBOR without affecting decoding
    • See the changelog for standard version 8.0.0 for more details
  • Feature: New --file option for dhall commands
    • In other words, instead of dhall <<< './some/file you can now use
      dhall --file some/file
    • See: #949
  • Feature: New --cache flag for dhall freeze command
    • This automates the idiom used by the Prelude to optimistically cache
      imports but gracefully degrade if the semantic integrity check fails
    • See: #980
  • Feature: Add :clear command to dhall repl
    • This deletes previous bindings from the history so that they can be
      garbage collected
    • See: #966
  • Feature: New chunkExprs Traversal added to Dhall.Core
  • Feature: New Dhall.Optics module
    • This re-exports some convenient @lens@ utilities used internally for
      packages trying to avoid a @lens@ dependency
    • See: #986
  • More GHC 8.8 support

dhall-1.23.0

11 May 20:24
bf4349e
Compare
Choose a tag to compare
  • BREAKING CHANGE: Fix marshaling union literals
    • 1.22.0 introduced two separate bugs in marshaling union literals between
      Dhall and Haskell, which this release fixes:
      • Dhall enums did not correctly map onto Haskell enums
      • New-style union literals (i.e. < A : T >.A x) were not correctly
        supported
    • See: #918
    • See: #927
    • See: #936
  • BUG FIX: Fix α-normalization
    • Version 1.22.0 introduced a new faster evaluation algorithm, but the new
      algorithm introduced two α-normalization regression, which this release
      fixes
    • The primary effect of this bug was that semantic integrity checks would
      fail for expressions that contain an if/then/else` expression in their
      normal form
    • See: #931
    • See: #938
  • BUG FIX: Fix merging of sort-level record types
    • The language standard requires that { a : Kind } ⩓ { b : Kind } is
      valid, which this change fixes
    • See: #891
  • BUG FIX: dhall freeze respects the --ascii flag
  • BUG FIX: Don't autocomplete fields for record types
    • This prevents the REPL from expanding { x : T }.<TAB> to { x : T }.x
    • See: #937
  • Support MonadFail-related changes in GHC 8.8
  • Add cross flag to simplify cross-compilation
    • This allows the dhall package to be built without using
      TemplateHaskell
    • See: #928
  • Increase lines of context for error messages
    • Error messages now provide at least 20 lines of context instead of 3
      before truncating large expressions
    • See: #916
  • Add line numbers to error messages
    • The bottom of every Dhall type error includes the original source code,
      which now has line numbers on the left margin
    • See: #919
  • Expand lower bounds on megaparsec/transformers-compat dependencies
    • This is to support dhall on Debian Sid
    • See: #939