Skip to content

Releases: dhall-lang/dhall-haskell

dhall-1.22.0

28 Apr 03:47
f7fecda
Compare
Choose a tag to compare
  • Supports version 7.0.0 of the standard
  • BREAKING CHANGE: Remove deprecated Path type synonym
  • BUG FIX: Correctly parse identifiers beginning with http
    • i.e. httpPort was supposed to be a valid identifier name and now is
    • See: #870
  • BUG FIX: Fix dhall encode bug
    • dhall encode bug was generating binary expressions that were valid
      (i.e. they would decode correctly) but were non-standard (i.e. hashing
      them would not match the hash you would normally get from a semantic
      integrity check)
    • Semantic integrity checks were not affected by this bug since they used
      a slightly different code path that generated the correct binary input to
      the hash. Only the dhall decode subcommand was affected
    • See: #859
  • BUG FIX: Fix for Dhall.UnionType
    • This fixes some expressions that would previously fail to marshal into
      Haskell, specifically those were the marshalling logic was built using
      the UnionType utilities
    • See: #857
  • Feature: New --alpha flag to α-normalize command-line output
  • Performance improvements
    • The normalizer is now much faster
    • See: #876

dhall-1.21.0

07 Mar 05:11
e392657
Compare
Choose a tag to compare
  • Supports version 6.0.0 of the language standard
  • BREAKING CHANGE: Remove the constructors keyword
  • BREAKING CHANGE: CBOR-encode only special Doubles as half-floats
    • ... as standardized in version 6.0.0 of the language standard
    • CBOR Doubles except Infinity/-Infinity/NaN/0.0 are now encoded in at
      least 32 bits
    • See: #822
  • BREAKING CHANGE: Sort record and union fields when CBOR-encoding
    • Fields and alternatives are now sorted when serialized
    • This does not affect semantic integrity checks, which already sorted these
      fields/alternatives before hashing expressions
    • This does affect the serialization of expressions that have not been
      normalized (e.g. uninterpreted expressions transmitted over the wire)
    • See: #835
  • BUG FIX: Fix non-exhaustive pattern match in dhall lint
    • This fixes: Irrefutable pattern failed for pattern Let (l' :| ls') d'
    • This bug would cause dhall lint to fail on some nested let/in
      expressions
    • See: #780
    • See: #784
  • BUG FIX: Don't fail if $HOME environment variable is unset
    • The interpreter was incorrectly throwing an exception if HOME was unset
    • The standard requires that implementations should handle the HOME
      environment variable being missing
    • See: #789
  • Feature: Remove version tag from semantic integrity check
    • ... as standardized in version 6.0.0 of the language standard
    • This is not a breaking change because this change also includes
      backwards-compatible support for semantic integrity checks produced by
      older versions of the interpreter
  • Feature: Support Unicode path components
    • ... as standardized in version 6.0.0 of the language standard
    • You can now use Unicode in path components if they are quoted
    • i.e. ./families/"禺.dhall" is now legal
  • Feature: Add Text/show built-in
    • ... as standardized in version 6.0.0 of the language standard
    • You can now convert a Text literal to its equivalent Dhall source code
      (which is itself a Text literal)
    • This comes in handy when using Dhall code to generate JSON or Dhall code
    • See: #811
  • Feature: Add --immediate-dependencies/--transitive-dependencies flags for
    dhall resolve
    • You can now retrieve all of your immediate or transitive dependencies as a
      textual list
    • This simplifies integration with other command-line tools (such as file
      watchers)
    • See: #795
    • See: #803
  • Feature: dhall freeze now only freezes remote imports by default
    • dhall freeze used to freeze all imports (including local imports and
      environment variables)
    • Now dhall freeze only freezes remote imports by default, which is what
      most users want
    • You can install freeze all imports using the --all flag
    • See: #808
  • Feature: :save and :load REPL state
    • :save with no arguments now saves the REPL state to a .dhall-repl-N
      file
    • The file format is a list of dhall repl commands
    • You can use :load to load the saved state back into the REPL
    • See: #807
  • Feature: Add :hash command to dhall repl
    • This lets you conveniently hash expressions within the dhall repl
    • See: #806
  • Feature: Add --check flag to dhall format
    • Use this to check if the input is already formatted
    • Useful for continuous integration when you want to ensure that all code
      under version control remains formatted
    • See: #810
  • Feature: Add UnionInputType builder for InputTypes
    • This is the union analog of RecordInputType, letting you build a
      record explicitly instead of deriving the instance using GHC generics
    • See: #775
  • Feature: Add :set/:unset commands to dhall repl
    • You can use these commands to set or unset command-line options
    • Currently only setting/unsetting --explain is supported
  • Standards-compliance fixes:
  • Documentation fixes:
  • Test fixes:
  • Improved error messages:
  • Formatting fixes:
  • REPL fixes:

dhall-1.20.1

06 Jan 03:27
fc3472d
Compare
Choose a tag to compare
  • BUG FIX: Fix binary encoding to use correct standard version
    • This fixes computed hashes to correctly match standard version 5.0.0
    • This is not marked as a breaking change since it is a bug fix. The
      1.20.0 release will be blacklisted on Hackage and users should upgrade
      from 1.19.* directly to 1.20.1
    • See: #771

dhall-1.20.0

29 Dec 19:22
6a70f13
Compare
Choose a tag to compare
  • Supports version 5.0.0 of the language standard
  • BREAKING CHANGE TO THE LANGUAGE: Implement standardized support for multi-line
    literals
    • This updates the multi-line support to match the standard
    • This is a breaking change because empty lines within the multi-line
      literal now require leading whitespace whereas previously they did not
    • This is also a breaking change because now a newline is required after
      the opening '' quotes whereas previously it was not required
    • If you use dhall format then your multi-line literals already have the
      necessary leading whitespace
  • BREAKING CHANGE TO THE LANGUAGE: constructors x = x
    • Now the constructors keyword behaves like an identity function, since
      constructors can already be accessed as fields off the original union
      type.
    • This is a breaking change since any record of terms that contains a
      constructors field will now be a forbidden mixed record of types and
      terms.
    • This is also a breaking change if you annotated the type of what used to
      be a constructors record.
    • dhall lint will now remove the obsolete constructors keyword for you
    • See: #693
    • See: #701
  • BREAKING CHANGE TO THE API: Restore Parent constructor for Local type
    • This more closely matches the standard and also enables dhall format to
      produce a leading ../ for imports instead of ./../
    • See: #718
  • BUG FIX: Fix type-checking bug for unions
    • The first fix was that the inferred type was wrong for unions where
      alternatives were types or kinds
    • The second fix was that unions that mixed terms/types/kinds were not
      properly rejected
    • See: #763
  • BUG FIX: Change how dhall repl handles prior definitions
    • This changes the REPL to handle previous bindings as if they were
      defined using a large let expression instead of adding them to the
      context
    • This fixes some type-checking false negatives
    • See: #729
  • Feature: Autocomplete for dhall repl
    • You can now auto-complete record fields, union constructors, and
      identifiers that are in scope
    • See: #727
  • Feature: GHCJS support
    • dhall can now be built using GHCJS, although some features are still
      not supported for GHCJS, such as:
      • Semantic integrity checks
      • Custom HTTP headers
    • Also, HTTP imports only work for URLs that support CORS
    • See: #739
  • Feature: Add support for records of records of types
    • You can now nest records of types
    • See: #700
  • Feature: Add :quit command for dhall repl
  • Feature: Add --json flag for dhall {encode,decode}
    • You can now produce/consume CBOR expressions via JSON instead of binary
    • See: #717
  • Feature: Add decoding logic for as Text
    • You can now preserve the as Text qualifier on imports when serializing
      them
    • See: #712
  • Prenormalize substituted expressions
    • This is a performance improvement that reduces the time and memory
      consumption when normalizing expressions
    • See: #765

dhall-1.19.1

27 Nov 08:14
04e2dbf
Compare
Choose a tag to compare

dhall-1.19.1

  • BUG FIX: Fix serious dhall lint bug
    • dhall lint would sometimes remove let expressions that were still
      in use
    • See: #703
  • BUG FIX: Fix import caching efficiency bug
    • Some imports were being wastefully fetched multiple times
    • See: #702
  • Feature: Generate dot graph to visualize import graph
    • Use the dhall resolve --dot command
    • See: #698
    • See: #713
  • Improve HTTP error messages

dhall-1.19.0

22 Nov 03:25
53ae87c
Compare
Choose a tag to compare

dhall-1.19.0

  • Supports version 4.0.0 of the language standard
  • BREAKING CHANGE TO THE LANGUAGE AND API: Prevent Hurkens' paradox
    • This fixes a type-checking soundness bug which permitted infinite loops
    • This is a breaking change because infinite loops are no longer possible
    • This is also a breaking change because a record of types is now treated as
      a kind instead of a type
    • See: #680
  • BREAKING CHANGE TO THE LANGUAGE AND API: Doubles are now double-precision
    floating point numbers
    • This restricts the range of Doubles to IEEE 754 double-precision
      floating point
    • This also implies that you can no longer convert Scientific values to
      Dhall expressions (i.e. no Inject instance for Scientific)
    • See: #667
  • BREAKING CHANGE TO THE API: Preserve field order for record projection
    • The API uses a new Dhall.Set.Set type instead of Data.Set.Set
    • See: #670
  • BREAKING CHANGE TO THE API: Add support for multi-let expressions
    • This changes the Let constructor to now support storing multiple
      bindings per let expression
    • See: #675
  • Access constructors as if they were fields of the union type
    • In other words: < Left : Bool | Right : Natural >.Left
    • See: #657
  • Support GHC 8.6
  • Add support for quoted path components
    • i.e. /"foo"/bar/"baz qux" or https://example.com/foo/"bar?baz"?qux
    • See: #690
  • Fix parsing of //\\ operator
  • Preserve Unicode characters when formatting code
  • Allow identifier names to begin with Some
  • Add subExpressions Traversal
  • Add normalizeWithM for monadic normalization
  • Custom normalizers now take precedence over default normalization logic
    • This allows one to override the implementation of built-in operators
    • See: #684

dhall-json-1.2.5

dhall-1.18.0

16 Oct 04:32
dbe8d7a
Compare
Choose a tag to compare
  • Supports version 3.0.0 of the language standard:
  • BREAKING CHANGE TO THE LANGUAGE AND API: New Some/None constructors for
    Optional values
    • Example: [ Some 1, None Natural ]
    • This is a breaking change to the language because Some and None are
      now reserved keywords
    • This is a breaking change to the API because Some and None are new
      constructors for the Expr type
  • BREAKING CHANGE TO THE LANGUAGE AND API: Support for kind polymorphism
    • This adds a new Sort constant above Kind in the hierarchy
    • i.e. Type : Kind : Sort
    • This is a breaking change to the language because Sort is now a
      reserved keyword
    • This is a breaking change to the API because Sort is a new
      constructor for the Expr type
  • BREAKING CHANGE TO THE API: New Dhall.Map module
    • This replaces InsOrdHashMap in the API
    • The primary motivation is to improve performance and to remove the
      dependency on insert-ordered-containers
  • BREAKING CHANGE TO THE API: Use standard version instead of protocol version
    • The binary protocol is now versioned alongside the standard
    • The ProtocolVersion type is renamed to StandardVersion and the
    • --protocol-version option is renamed to --standard-version
    • See: #634
  • BUG FIX: Fix import chaining for custom header imports
  • BUG FIX: Fix import chaining for imports protected by semantic integrity
    checks
  • BUG FIX: Record literals and types produced by // are now sorted
    • This ensures that β-normalization is idempotent
    • See: #572
  • BUG FIX: dhall freeze now correctly handles the starting file being
    located outside the current working directory
  • BUG FIX: Fix parsing of IPv4-mapped IPv6 addresses
  • FEATURE: New --ascii flag for ASCII output
  • FEATURE: New dhall encode and dhall decode subcommands
    • These allow you to transform Dhall source code to and from its binary
      representation
    • See: #588
  • LARGE parsing performance improvements
  • Type-checking performance improvements:
  • Normalization performance improvements:
  • dhall freeze now caches the imports as it freezes them
  • dhall freeze now refreezes imports with invalid semantic integrity checks
  • dhall freeze now adds a trailing newline
  • Build against megaparsec-7.0.*
  • Support GHC 8.6
  • Support GHC all the way back to 7.10.3
  • Improvements to error messages:

dhall-1.17.0

31 Aug 15:30
befd0ed
Compare
Choose a tag to compare
  • This release corresponds to version 2.0.0 of the language standard
  • BREAKING CHANGE TO THE LANGUAGE AND API: Binary serialization support
    • This is a breaking change to the hash for all semantic integrity checks
    • The hash used by the semantic integrity check is now based on the
      binary representation instead of a text representation of the
      expression
    • You can pin the new hashes by supplying the --protocol-version 1.0
      option on the command line until you need support for newer language
      features
    • This also includes a breaking change to ImportType in the API
  • BREAKING CHANGE TO THE LANGUAGE: Disallow combining records of terms and
    types
    • This is mainly for consistency and to improve type errors that would
      have otherwise happened further downstream
    • This should not affect the vast majority of code
    • See: #538
  • BUG FIX: Semantic integrity checks now work for imported expression using
    the constructors keyword
  • BUG FIX: Fix α-normalization of expressions with bound variables named _
  • BUG FIX: Fix isNormalized to match normalize
  • BUG FIX: dhall lint now correctly handles nested let expressions
  • FEATURE: Imports protected by a semantic integrity check are now cached
  • The default dhall command no longer outputs the type to stderr
    • You can add back the type as a type annotation using the
      --annotate switch
    • See: #544
  • New utilities for building InputTypes
  • Improve parsing performance for long variable names
  • More succinct type diffs for function types
  • Identifier names can now begin with keywords
    • i.e. ifChanged and lettuce are now legal identifiers
    • See: #551

dhall-1.16.1

22 Jul 14:52
8b61990
Compare
Choose a tag to compare
  • Fix test failure due to missing test data file

dhall-1.16.0

22 Jul 14:51
728ffcc
Compare
Choose a tag to compare
  • BREAKING CHANGE: Consolidate input family of functions
    • These now take a record of options
    • This also _stack field of the Status type from [Import] to
      NonEmpty Import
  • Permit $ in quoted variable names