dhall
A configuration language guaranteed to terminate
LTS Haskell 22.33: | 1.42.1 |
Stackage Nightly 2023-12-26: | 1.42.1 |
Latest on Hackage: | 1.42.1 |
dhall-1.42.1@sha256:3af5086c38158868ef7f94c6db8832cf9c61e8eab1010b33e109c4ddca0f0668,16814
Module documentation for 1.42.1
- Dhall
- Dhall.Binary
- Dhall.Context
- Dhall.Core
- Dhall.Crypto
- Dhall.Diff
- Dhall.DirectoryTree
- Dhall.Format
- Dhall.Freeze
- Dhall.Import
- Dhall.Lint
- Dhall.Main
- Dhall.Map
- Dhall.Marshal
- Dhall.Optics
- Dhall.Package
- Dhall.Parser
- Dhall.Pretty
- Dhall.Repl
- Dhall.Schemas
- Dhall.Set
- Dhall.Src
- Dhall.Substitution
- Dhall.Tags
- Dhall.Tutorial
- Dhall.TypeCheck
- Dhall.Util
- Dhall.Version
Dhall is an explicitly typed configuration language that is not Turing complete. Despite being Turing incomplete, Dhall is a real programming language with a type-checker and evaluator.
Use this library to parse, type-check, evaluate, and pretty-print the Dhall configuration language. This package also includes an executable which type-checks a Dhall file and reduces the file to a fully evaluated normal form.
Read Dhall.Tutorial
to learn how to use this library
Changes
1.42.1
-
Add several new entrypoints to
Dhall
module [#2534] / [#2544] -
Build against latest versions of:
ansi-terminal
optparse-applicative
optparse-generic
lens
template-haskell
[#2532] / [#2542]unix-compat
1.42.0
-
Supports standard version 23.0.0
- BREAKING CHANGE TO THE API AND LANGUAGE: Language support for
Bytes
literals- This is a breaking change to the API due to adding new
Bytes
andBytesLiteral
constructors to theExpr
type - This is a breaking change to the language now that
Bytes
is a reserved identifier
- This is a breaking change to the API due to adding new
- BREAKING CHANGE TO THE API AND LANGUAGE: New
{Date,Time,TimeZone}/show
builtins- This is a breaking change to the API due to adding new
{Date,Time,TimeZone}Show
constructors to theExpr
type - This is a breaking change to the language now that
{Date,Time,TimeZone}/show
are not reserved identifiers
- This is a breaking change to the API due to adding new
- BREAKING CHANGE TO THE API AND LANGUAGE: Language support for
-
BREAKING CHANGE:
dhall lint
no longer sortslet
bindings- This had to be removed because the old behavior was not always correct
- The old behavior would sometimes change the behavior of a Dhall program or break the program
- Out of an abundance of caution we’re disabling the feature until it can be properly fixed (which is’t trivial)
-
BUG FIX: Fix pretty-printing of
Time
literals- The pretty-printer was stripping leading zeros from the fractional component of seconds
-
BUG FIX: Fix custom normalizers to work for things other than functions
- Before this change you could extend the language with custom functions, but
not custom values (e.g.
foo = 1
)
- Before this change you could extend the language with custom functions, but
not custom values (e.g.
-
BUG FIX: Don’t URL encode path components
- The pretty-printer was URL-encoding path components, which is not correct (according to the standard)
- URL path components are supposed to be already URL-encoded by the user and left undisturbed by the interpreter (which is now what it correctly does)
-
New
dhall package
command: #2478, #2508- This command makes it easier to turn a directory full of Dhall expressions
into a dhall package (e.g.
package.dhall
)
- This command makes it easier to turn a directory full of Dhall expressions
into a dhall package (e.g.
-
Improved
dhall to-directory-tree
subcommand- The
dhall to-directory-tree
subcommand now optionally supports specifying metadata for generated paths - For a worked example, see: https://github.com/dhall-lang/dhall-haskell/blob/main/dhall/examples/to-directory-tree.dhall
- The
-
dhall freeze --cache --all
is now idempotent: #2486, #2500- Before this change a second run would fail due to attempting to resolve
the
missing
import it would generate
- Before this change a second run would fail due to attempting to resolve
the
-
New Template Haskell options for adding strictness annotations to generated Haskell types
-
Template Haskell can now generate higher-kinded Haskell types from higher-kinded Dhall types
-
New
Dhall.Freeze
utilities for working with custom evaluators
1.41.2
- BUG FIX: Fix
:hash
REPL command to α-normalize input - Add
{From,To}Dhall
instances forDayOfWeek
- Add
{From,To}Dhall
instances forShortText
- Performance improvements
- Fixes and improvements to haddocks
- Fixes and improvements to test suite
- Build against newer dependencies
1.41.1
1.41.0
- Support standard version 22.0.0
- BUG FIX: Fix pretty-printing of time zones
- Timezones with a negative offset were previously being rendered with two leading minus signs instead of one
- BUG FIX:
dhall freeze --cache
to work with standard version 21.0.0dhall freeze
will now usemissing sha256:…
for the first import so that the latter import will be tried if the import is not in cache- The old behavior is incompatible with standard version 21.0.0 because the
new behavior of the
?
operator doesn’t fall back on hash mismatches
- BUG FIX: Allow
with
expression to update a field namedSome
- This fixes a discrepancy between the Haskell implementation and the standard
where the Haskell implementation would not permit
{ Some = 0 } with Some = 1
- This fixes a discrepancy between the Haskell implementation and the standard
where the Haskell implementation would not permit
- Fix
dhall {format,lint,freeze}
to preserve leading shebangs - Add
FromDhall
instances forInt{8,16,32,64}
1.40.2
- Supports standard version 21.1.0
- BUG FIX:
dhall repl
no longer ignores type annotations on:let
commands- Before this fix,
:let x : T = 3
would ignore the: T
type annotation
- Before this fix,
- BUG FIX: Don’t accept a bar after an empty union
- Before this fix, the interpreter would accept something like
<>|
, which is not valid according to the standard grammar
- Before this fix, the interpreter would accept something like
- New
FromDhall
/ToDhall
instances forDay
/TimeOfDay
/TimeZone
#2294 #2300- These types correspond to the recent temporal literals added to the language
- New
subExpressionsWith
Traversal
- Add Template Haskell support for modifying field names in generated Haskell
types
- This adds a new
makeHaskellTypesWith
utility with takes aGenerateOptions
function argument for customizing the code-generation logic - This comes in handy when Dhall fields have names are reserved keywords in Haskell code. You can now transform the Haskell field names to avoid collisions
- This adds a new
- Support GHC 9.2
- Fixes and improvements to documentation
- Fixes and improvements to error messages
1.40.1
- BUG FIX: Fix equivalence check for
Date
/Time
/TimeZone
- This fixes a serious bug in the recently introduced support for temporal literals where they would fail to type-check when given a correct type annotation or when they were checked against an existing type
- For example,
00:00:00 : Time
was failing to type-check
1.40.0
- Almost supports version 20.2.0 of the standard
- The main thing that is missing is support for the
headers.dhall
file - BREAKING CHANGE TO THE LANGUAGE: Add support for
Date
/Time
/TimeZone
- This is a breaking change because
Date
,Time
, andTimeZone
are now reserved identifiers
- This is a breaking change because
- Improved fallback behavior for
?
- The main thing that is missing is support for the
- BREAKING CHANGE TO THE LANGUAGE: Require whitespace before
with
- The parser now requires whitespace before the
with
keyword, which brings the Haskell implementation into closer compliance with the standard - In practice this is a technically breaking change which will not affect most programs
- The parser now requires whitespace before the
- New
FromDhall
instances forPredicate
,Equivalence
, andOp
dhall lint
will now sortlet
bindings with importsdhall lint
now reorderslet
bindings to move imports to the top so long as doing so does not change the behavior of the program
- Fixes and improvements to code formatting
- Fixes and improvements to error messages
1.39.0
- Supports version 20.2.0 of the standard
- BREAKING CHANGE TO THE API:
dhall {format,freeze,lint}
now accept multiple files- The
--inplace
flag is no longer necessary and you can now specify multiple files to update in place on the command line, likedhall format foo.dhall bar.dhall
- The
--inplace
flag is still accepted, but does nothing, and will emit a warning - This is a breaking change to the API for formatting/freezing/linting files because now you can specify multiple inputs instead of one input
- The
- BREAKING CHANGE: Pre-6.0.0 hashes are no longer supported
- The interpreter no longer provides backwards compatibility for integrity checks computed before standard version 6.0.0
- This is a breaking change to the API of the
Dhall.Binary
module, where certain utilities are no longer parameterized on aStandardVersion
- This is also a breaking change to any Dhall code that depended on these really old integrity checks
- BUG FIX: Formatting
≡
now correctly preserves the original character set - BUG FIX: Don’t panic on
Text/replace ""
- Quasiquotation support for Dhall
- You can now convert a Dhall expression to the corresponding syntax tree
using a quasiquoter like this:
[dhall| \x -> x + 2 ]
- You can now convert a Dhall expression to the corresponding syntax tree
using a quasiquoter like this:
- New
Dhall.Marshal.{Encode,Decode}
modules- These modules split up the
Dhall
module into two smaller modules for encoding and decoding logic, respectively - The
Dhall
module still re-exports the same functionality as before, so this is not a breaking change
- These modules split up the
- Support GHC 9.0.1
- Fixes and improvements to code formatting
1.38.1
- Add
INLINABLE
annotations in more places- This may improve performance by enabling more specializations
- Fix
hashable
-related test failures - Fix support for GHC 8.4.4
- … by using
GeneralizedNewtypeDeriving
(with az
)
- … by using
- Allow doctest-0.18
- Allow bytestring-0.11
1.38.0
- BREAKING CHANGE: Detect preferred character set from input
dhall format
will now preserve the character set of the formatted file by default. In other words, if the file uses ASCII punctuation thendhall format
will format the file using ASCII punctuation.- If the file contains both ASCII and Unicode punctuation it will prefer Unicode by default
- This is a breaking change because the
Lam
/Pi
/Combine
/CombineTypes
, andPrefer
constructors now take an additional argument to record which character set was used
- BUG FIX: Fix CORS compliance check
- Previous versions were not correctly enforcing CORS compliance
- This implies that some imports that would have worked previously by accident will now fail; specifically: an import from one domain transitively importing something from another domain that has not opted into CORS
- Add
ToDhall (Fix f)
instance - Fixes and improvements to error messages
1.37.1
1.37.0
- Supports version 20.0.0 of the standard
- BREAKING CHANGE TO THE API: Improve error message for duplicate projection label
- This also makes the implementation more standards-compliant, by treating a duplicate label as a type error instead of a parse error
- This is a breaking change since the
Project
constructor now stores a[Text]
instead ofSet Text
- Add
--cache
flag todhall hash
- This flag adds the hashed expression to the cache when enabled
- Deprecate
Inject
/Interpret
- You should instead use
ToDhall
/FromDhall
, respectively
- You should instead use
- Fixes and improvements to the haddocks:
- Fixes and improvements to error messages:
- Fixes and improvements to the parser:
- Fixes and improvements to the pretty printer:
1.36.0
- Supports version 19.0.0 of the standard
- BREAKING CHANGE TO THE API: Add
Text/replace
built-in - Implement
with
without syntactic sugar
- BREAKING CHANGE TO THE API: Add
dhall lint
will now add a.dhall
extension to all Prelude imports- The old extension-free Prelude imports are deprecated
- Fix command-line completions for files
- Improve Template Haskell support for record constructors
- Fixes and improvements to code formatting
1.35.0
- Supports version 18.0.0 of the standard
- Implement more efficient
with
desugaring- Chained
with
expressions will now be much more efficient
- Chained
- Implement more efficient
- BREAKING CHANGE TO THE API: Preserve whitespace for
Lam
constructor- This change extends the
Lam
constructor to preserve whitespace around the variable binding - The motivation for this change is to enable
dhall-docs
to support jumping to definitions - You can replace your existing
Lam
constructors withDhall.Core.makeFunctionBinding
- This change extends the
- BREAKING CHANGE TO THE API: Preserve whitespace for
Field
constructors- This change extends the
Field
constructor to preserve whitespace around the selected field - The motivation for this change is to enable
dhall-docs
to support jumping to definitions - You can use
Dhall.Core.makeFieldSelection
andDhall.Core.fieldSelectionLabel
to convert between the detailed and the simple representation of the selected field.
- This change extends the
- Add
FromDhall
instances for{Int,Word}{,8,16,32,64}
- Add
--output
option fordhall text
subcommand - Add
Dhall.Crypto.toString
- Make the HTTP
Manager
configurable- Several import-related functions now provide an alternative variants that
allows the user to supply a custom
Manager
- You can use this to tweak HTTP request timeouts or use a different TLS
manager (e.g. one from
http-client-openssl
)
- Several import-related functions now provide an alternative variants that
allows the user to supply a custom
- Fixes and improvements to code formatting
- Fixes and improvements to documentation
- Fixes and improvements to test suite
1.34.0
- Supports version 17.1.0 of the standard
- BREAKING CHANGE to the API: Support prefix comments on record key-value pairs
- The Dhall AST (i.e.
Expr
) now preserves some comments for record types and record literals - The impact of this change is that you will need to add
Dhall.Syntax.makeRecordField
orDhall.Syntax.recordFieldValue
in a few places wherever your Haskell assembles or disassembles record expressions - The motivation of this change is two-fold:
- To eventually enable
dhall-docs
support for rendering record comments as documentation - To eventually enable support for preserving record-related comments when formatting Dhall code
- To eventually enable
- The Dhall AST (i.e.
- BUG FIX: Fix
with
expressions to permit functions on their left-hand side- This was a case of the Haskell implementation not being compliant with the standard grammar
- Drop support for GHC 8.2
- Add a new
dhall rewrite-with-schemas
command- You can now simplify a Dhall expression using a schema record (e.g. a
./schemas.dhall
record that a package might provide) - This simplification replaces large anonymous records with an equivalent use of a record completion when possible
- You can now simplify a Dhall expression using a schema record (e.g. a
- Add
--transitive
flag to `dhall {format,lint,freeze}- This flag lets you format/lint/freeze a file and all of its transitive dependencies that are reachable via relative file imports
- Move
man/dhall.1
todata-files
- This ensures that Cabal will install
dhall
’sman
pages in the correct directory
- This ensures that Cabal will install
- Performance improvements
- Standards compliance
- Fixes and improvements to haddocks
1.33.1
- Multi-line REPL / support
repline-0.4.0.0
dhall repl
supports a new:paste
command that lets you input a command by pasting one or more lines
1.33.0
- Supports version 17.0.0 of the standard
- BREAKING CHANGE: URLs no longer support quoted path components
- BREAKING CHANGE:
Optional/{fold,build}
are no longer built-ins - Record fields now permit empty labels
- BREAKING CHANGE: Fail instead of hanging when deriving
FromDhall
for recursive types- This is a breaking change as now the
expected
type returns anExpector (Expr Src Void)
(essentially anEither
) instead ofExpr Src Void
- If you really don’t want to handle the new error-related wrapper, you can get the old behavior using a partial pattern match (which will be partial, still an improvement over the previous behavior, which was hanging)
- This is a breaking change as now the
- Fix invalid cache entries
- The interpreter will now correct cached expressions that are incorrect and warn you when this happens
- Specifically, if there is a hash mismatch from the cached expression the interpreter will resolve the import again and fix the cache if the resolved import matches the expected hash
- Make
encodeExpression
polymorphicencodeExpression
now has a more general type, which means that you can use it to serialise expressions without imports (i.e. ones of typeExpr Void Void
)
- Add
--quiet
option fordhall decode
- Add
--noted
flag fordhall haskell-syntax-tree
- Performance improvements:
- Improvements to error messages
- Fixes to haddocks
1.32.0
- Supports version 16.0.0 of the standard
- BREAKING CHANGE: Change the precedence of
with
and===
- The precedence change to
with
means that some old expressions that were valid now require explicit parentheses
- The precedence change to
- BREAKING CHANGE: Use RFC7049bis encoding for
Double
s- This is a breaking change because the hashes of expressions with small
Double
literals will change now
- This is a breaking change because the hashes of expressions with small
- Add support for unions mixing terms and types
- For example,
< A : Bool | B : Type >
is legal now - You can now write
someRecord with a.b.c = x
to update a nested fields
- For example,
- BREAKING CHANGE: Change the precedence of
- DEPRECATION: Deprecate
Dhall.Parser.exprA
Dhall.Parser
module will eventually drop support for parsing custom import types- This is necessary in order to fix several parsing bugs and improve parsing error messages
- BUG FIX: GHC Generics instance for
:+:
now usesunion
- This fixes a few subtle bugs in how Dhall unions are marshalled into Haskell types, and also improves the error messages
- Formatting improvements
- Convert union alternatives to directory tree
dhall to-directory-tree
now supports unions which are automatically unwrapped
- Fix
dhall freeze --cache
to better handle protected importsdhall freeze --cache
will now also update imports that already have integrity checks
- Don’t normalized partially saturated
{List,Natural}/fold
- The behavior now matches the standard. Previously, the Haskell implementation was not standards-compliant because it would normalize these partially saturated built-ins
1.31.1
- BUG FIX: Allow whitespace after record pun entry
- The record pun feature introduced in the previous release did not correctly parse record puns with trailing whitespace, which this change fixes.
- Expose
{default,}InputNormalizer
- The previous version introduced a breaking change to the
autoWith
type that required access to the implementation ofInputNormalizer
, which was not exported. This change fixes that.
- The previous version introduced a breaking change to the
- Build against latest dependencies
- Prefer to format using record puns when possible
dhall format
will now reformat code to use record puns when applicable
- Fixes and improvements to error messages:
1.31.0
- Supports version 15.0.0 of the standard
- Implement
with
keyword- You can now write
someRecord with a.b.c = x
to update a nested fields
- You can now write
- Add support for record puns
- You can now write
{ x, y }
as a shorthand for{ x = x, y = y }
- You can now write
- Implement
- 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
- Now the
- BREAKING CHANGE TO THE API:
From/ToDhall
no longer takesInterpretOptions
argument- The types of the
autoWith
andinjectWith
methods have changed to take anInputNormalizer
instead of anInterpretOptions
- Note that
InputNormalizer
is a subset ofInterpretOptions
- Note that
- 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
withFromJSON
/ToJSON
)- Previously you would customize the behavior globally by passing in
a top-level
InterpretOptions
record toautoWith
- Now you can customize the behavior locally on a per-instance basis
- Previously you would customize the behavior globally by passing in
a top-level
- This change enables the following change …
- The types of the
- Add
Dhall.Deriving
module forderiving-via
helpers- Now you can take advantage of the
-XDerivingVia
language extension to customize derivedFromDhall
/ToDhall
instances, like this:deriving (FromDhall, ToDhall) via Codec (SetSingletonConstructors Bare) Name
- Now you can take advantage of the
- 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 ashttps://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 as255
- Now
- Add
dhall to-directory-tree
support forMap
sMap
s 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
- The command-line
- 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
- Supports version 14.0.0 of the standard
- BREAKING CHANGE TO THE API: Add
--check
flag todhall {lint,freeze}
- You can now use the
--check
flag to verify that a file has already been linted or frozen - This is a breaking change to the types used by the
Dhall.Format
module
- You can now use the
- BREAKING CHANGE TO THE LANGUAGE: Disallow
Natural
literals with leading zeros- Now a literal like
042
is no longer valid - See the changelog for standard version 14.0.0 for more details
- Now a literal like
- BUG FIX: Fix parsing of
Double
literal trailing whitespace- Certain expressions using
Double
literals would fail to parse, which this change fixes
- Certain expressions using
- BUG FIX: Use
DeriveLift
instead of GHC Generics to deriveLift
- This fixes a build failure on GHC 8.10
- Drop support for GHC 7.10.3
- GHC 8.0.2 is now the earliest supported version
- Add support for dotted field syntax
{ x.y.z = 1 }
now legal syntax for nested fields- See the changelog for standard version 14.0.0 for more details
- Add support for duplicate record fields
- This combines with the previous feature to let you write
{ x.y = 1, x.z = True }
, which is equivalent to{ x = { y = 1, z = True } }
- See the changelog for standard version 14.0.0 for more details
- This combines with the previous feature to let you write
- Add
dhall lint
support for deprecatingOptional/{fold,build}
- The
Optional/{fold,build}
built-ins are deprecated and can be implemented in terms of other language features Optional/fold
can be implemented in terms ofmerge
(which now works onOptional
values)Optional/build
could always be implemented usingSome
/None
dhall lint
now transforms the deprecated built-ins to use their equivalent built-in-free versions
- The
- Support Template Haskell for multiple datatypes
- This extends the Template Haskell support added in the previous release to work for datatypes that refer to one another
- Add support for custom substitutions
- You can now add custom substitutions, which are like
let
bindings that propagate to transitive imports
- You can now add custom substitutions, which are like
- Small formatting fixes
1.29.0
- Supports version 13.0.0 of the standard
- BREAKING CHANGE: Generate Haskell datatype declarations from Dhall types
- You can now use the
makeHaskellTypeFromUnion
Template Haskell utility to generate a Haskell datatype declaration from a Dhall union type - This helps ensure that your Haskell types and Dhall types stay in sync, when you want the Dhall type to be the source of truth
- This is a breaking change because the default
InterpretOptions
changed the default handling of singleton constructors fromWrapped
toSmart
- You can preserve the old behavior using:
autoWith defaultInterpretOptions{ singletonConstructors = Wrapped }
- You can now use the
- BUG FIX: Fix
dhall freeze --cache
anddhall lint
to preservelet
-related comments- Now they match the behavior of
dhall format
with regard to preserving these comments
- Now they match the behavior of
- BUG FIX: Fix escaping of significant leading whitespace when formatting code
- The formatter would sometimes unnecessarily escape significant leading whitespace for the final line of multiline string literals, which this change fixes
- BUG FIX: Fix
dhall encode --json
forDouble
values - NEW FEATURE:
dhall to-directory-tree
command- You can now generate a directory tree from a Dhall expression
- Specifically:
- records are converted to directories
Text
fields are converted to files named after the fieldOptional
values are omitted ifNone
- Everything else is rejected
- NEW FEATURE: Hexadecimal literals
- See the changelog for standard version 13.0.0 for more details
- NEW FEATURE:
merge
works onOptional
values- See the changelog for standard version 13.0.0 for more details
- Improve formatter
dhall format
will now render expressions nested inside record fields or alternatives more compactly, including:- Records
- Record completion expressions
- Expressions wrapped in
Some
- Lists
- Exclude the
using ...
suffix from imports listed bydhall resolve
- Specifically when using the
--{immediate,transitive}-dependencies
flags
- Specifically when using the
1.28.0
- Supports version 12.0.0 of the standard
- BREAKING CHANGE: Add
Integer/{clamp,negate}
built-ins- This is a technically breaking change API since this adds a new
constructor to the
Expr
type - This is also a technically breaking change to the language. See the changelog for standard version 12.0.0 for more details
- This is a technically breaking change API since this adds a new
constructor to the
- BREAKING CHANGE: Remove support for fusion
- This is also a technically breaking change to the language. See the changelog for standard version 12.0.0 for more details
- BREAKING CHANGE: Parse whitespace more precisely
- The Haskell implementation now matches the official grammar much more closely, but as a result will now reject some programs that it used to accept
- For example,
1:Natural
used to be valid and now is no longer valid as the standard requires mandatory whitespace after the:
- Consult the standard grammar if you run into a new parsing error as a result of this change
- This is also a parsing performance regression (specifically for parsing comments), but should not be noticeable in practice. See #1512 for more details
- BREAKING CHANGE: Rename
Type
toDecoder
andInputType
toEncoder
#1483 / #1489 - BUG FIX: Fix
dhall format --check
- Before this change
dhall format --check
would fail due to attempting to read all of standard input in twice
- Before this change
- BUG FIX: Fix
dhall freeze
to always re-freeze an import- Before this fix,
dhall freeze
would not attempt to refreeze an already frozen import
- Before this fix,
- Permit spaces around completion operator
- See the changelog for standard version 12.0.0 for more details
- Make
missing
referentially transparentmissing
can now be imported transitively via a remote import- Normally resolving
missing
would still still fail, except formissing as Location
, which is now a valid transitive import - See the changelog for standard version 12.0.0 for more details
- Write cache files atomically
- This is a resilience improvement so that the cache is not left in a corrupt state in the event of a power outage or exhausting disk/memory
- New
Dhall.function
utility- This is provides the same functionality as the
Interpret
instance for(->)
, except without the use of typeclasses
- This is provides the same functionality as the
- New
dhall haskell-syntax-tree
command- This command displays the Haskell syntax tree of an expression (primarily for debugging purposes)
- Note that this is highly-volatile and subject to change, so don’t depend on this programmatically. We may break the output of this command without any notice.
- Add
instance Show Ann
- Move normalization code from
Dhall.Core
toDhall.Normalize
- Note that this is not a breaking change. The relocated utilities are
still re-exported from
Dhall.Core
- Note that this is not a breaking change. The relocated utilities are
still re-exported from
- Fix
dhall resolve --transitive-dependencies
to list dependencies in “post-order” - Performance improvements
- Fixes and improvements to code formatting
- Fixes and improvements to code linting
- Fixes and improvements to error messages
- Fixes and improvements to the parser
- Fixes and improvements to diffs
- Fixes and improvements to the REPL
- Fixes and improvements to documentation
1.27.0
- Supports version 11.0.0 of the standard
- BREAKING CHANGE: Rename
Inject
/Interpret
toToDhall
/FromDhall
- This change
ConstraintKinds
to minimize disruption by keeping aroundInject
/Interpret
as synonyms forToDhall
/FromDhall
- In other words, constraints and derived instances using
Inject
orInterpret
will still work - However, manual instances using
Inject
orInterpret
won’t work unless you rename them toToDhall
/FromDhall
or enable theTypeSynonymInstances
extension
- This change
- BREAKING CHANGE: Fix
Eq
instance forExpr
s with specialDouble
s- This fixes the
Eq
instance forExpr
s to match the standard regardingDouble
comparisons - Specifically:
NaN == NaN
and-0.0 /= 0.0
- This is a breaking change because the
DoubleLit
constructor ofExpr
now stores aDhallDouble
instead of aDouble
- This fixes the
- BREAKING CHANGE: Add
--file
option fordhall hash
- This is a breaking change because it also removes the
Dhall.Hash
module, which wasn’t really carrying its own weight
- This is a breaking change because it also removes the
- Add support for leading separators
- See the changelog for standard version 11.0.0 for more details
- Add record completion operator
- See the changelog for standard version 11.0.0 for more details
- Add
dhall tags
subcommand- This generates an ETags file from an input file or directory
- Add
dhall lint
support for fixing malformed assertionsdhall lint
now fixeslet example = foo === bar
to belet example = assert : foo === bar
- Normalize inferred types #1337
- New
FromDhall
/ToDhall
(previouslyInterpret
/Inject
) instances for: - Add
--output
option todhall
- Move syntax things from
Dhall.Core
to a newDhall.Syntax
module- This is not a breaking change.
Dhall.Core
still re-exports the same API as before
- This is not a breaking change.
- Performance improvements
- Fixes and improvements to code formatting
1.26.1
- TECHNICALLY BREAKING CHANGES: Simplify
⫽
within projection / Simplify nested record projections- These are technically breaking changes because you will need to update integrity checks that protect code simplified in this way
- We’re not bumping the major version since the likelihood that you’re affected is quite low
- BUG FIX: Fix performance regression
- This change fixes the performance regression introduced in the previous release (version 1.26.0)
- BUG FIX: Prevent REPL from inserting inferred
Sort
s into context- This protects the REPL from getting hosed if you define an expression
using
:let
that has an inferred type ofSort
- This protects the REPL from getting hosed if you define an expression
using
- NEW FEATURE: Improved
Inject
/Interpret
support for 1-field constructors - (#1315 / #1321)- This adds a new
singletonConstructors
field toInterpretOptions
that lets you control what Dhall type 1-field Haskell constructors correspond to - The default (
Wrapped
) is backwards compatible with the old behavior - The
Smart
option is probably what you want: it will strip the Haskell constructor from the Dhall type if the constructor has one anonymous field - The
Bare
option always strips 1-field Haskell constructors from the Dhall type
- This adds a new
- NEW FEATURE:
--censor
flag that disables source code display (#1312 / #1329)- Use this flag when you don’t want sensitive
Text
literals showing up in parsing or type-checking error messages
- Use this flag when you don’t want sensitive
- Format record fields more compactly if they fit on 1 line
- The formatter will now format record fields on a field-by-field basis to avoid unnecessary vertical sprawl of formatted records
- Specifically, record fields that fit on one line will now be formatted on one line
- Add
--quiet
option todhall type
- This lets you use
dhall type
in “check only” mode (e.g. for CI for for development feedback)
- This lets you use
- Improved GHCJS support - (#1311 / #1330)
- Fix all executables to accept
--version
- Note that the
dhall version
subcommand is still supported, too
- Note that the
- New
Dhall.Version
module - Don’t normalize inferred types
- This fixes
dhall type
to more accurately follow the standard
- This fixes
- Initial changes for GHC 8.8 support
- Fix Haddock formatting for
dhallFromJSON
- Improved Windows caching support
dhall
will now prefer the%LOCALAPPDATA%
directory for caching if it is available
- Warn about missing cache directories
1.26.0
- Supports version 10.0.0 of the standard
- BREAKING CHANGE TO THE LANGUAGE: Remove old union literal syntax
- Union literals of the form
< x = e | ... >
are no longer valid - For more details, see: Migration: Deprecation of old union literal syntax
- Also see the changelog for standard version 10.0.0 for more details
- Union literals of the form
- BREAKING CHANGE TO THE API: Change
X
to be a type synonym forData.Void
- This is a breaking change if you were previously pattern matching on the
X
constructor. You can replace that with the use ofData.Void.absurd
- This is a breaking change if you were previously pattern matching on the
- BREAKING CHANGE TO THE API: Treat multi-
let
s as syntactic sugar- This is a breaking change because the
Let
constructor now only stores oneBinding
instead of aNonEmpty
list ofBinding
s
- This is a breaking change because the
- PERFORMANCE REGRESSION & TECHNICALLY BREAKING CHANGE TO THE LANGUAGE: Dependent types
- You can now write functions from terms to types
- There is also now language support for tests of the form
assert : x === y
- This deteriorates the performance of large multi-
let
expressions (See: #1306) - Splitting large multi-
let
expressions into smaller files may mitigate the problem as a work-around for now - Follow #1129 for work to fix this performance regression
- This is also a technically breaking change because
assert
is now a reserved keyword - See the changelog for standard version 10.0.0 for more details
- TECHNICALLY BREAKING CHANGE TO THE LANGUAGE: Add
Natural/subtract
built-in- The language now supports machine subtraction, which can be used to
support several other high-performance operations (like
Natural
comparisons) - This is a technically breaking change if you used
Natural/subtract
as an identifier in your code - See the changelog for standard version 10.0.0 for more details
- The language now supports machine subtraction, which can be used to
support several other high-performance operations (like
- TECHNICALLY BREAKING CHANGE TO THE LANGUAGE: More simplifications for field selection
- Now the interpreter will more intelligently simplify certain field projections
- For example:
λ(x : { a : Bool, b : Bool }) → (x ⫽ { c = 0 }).{ a, c }.c
will now simplify toλ(x : { a : Bool, b : Bool }) → 0
- This is a technically breaking change because you will need to update integrity checks that protect code simplified in this way
- See the changelog for standard version 10.0.0 for more details
- TECHNICALLY BREAKING CHANGE TO THE LANGUAGE: Simplify
⫽
when its arguments are equivalent- This is a technically breaking change for the same reason: this will perturb semantic integrity checks for affected code
- See the changelog for standard version 10.0.0 for more details
- NEW FEATURE: Restore support for records containing both types and terms
- In other words
{ foo = 1, bar = Bool }
is now valid again - This means that you now can export a single package containing both types and terms
- See the changelog for standard version 10.0.0 for more details
- In other words
dhall format
now preserveslet
commentsdhall
format will now preserve comments in the following locations of alet
binding:let {- HERE -} x {- HERE -} : {- HERE -} Bool = {- HERE -} True in x
- This support handles both single-line and multi-line comments and also takes care of correctly indenting/dedenting them
- Note that comments before the
let
keyword are still not preserved (unless it is the beginning of the file)
- Add API support for marshalling recursive types
- You can now marshal recursive types from Dhall into Haskell using the newly-added utilities
- See also: #1298
- New
:help
command fordhall repl
- New
--no-cache
flag #1290 / #1434 / #1436- You can now disable use of the cache with this flag
- This comes in handy if you want to disable α-normalization for imports protected by a semantic integrity check
- Bug fixes
- Performance optimizations
- Improvements to error messages
- Improvements to formatting
- Improvements to diffs
- Improvements to documentation
- Improvements to command-line interface
1.25.0
- Supports version 9.0.0 of the standard
- BREAKING CHANGE: Remove support for old-style
List
-likeOptional
literals- List-like
Optional
Literals (i.e.[ 1 ] : Optional Natural
) are no longer valid - See: https://github.com/dhall-lang/dhall-haskell/pull/1002
- List-like
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/987
- See: https://github.com/dhall-lang/dhall-haskell/pull/1104
- BREAKING CHANGE: Make the type of extract richer:
Dhall.extract
can now return a detailed error instead of just aMaybe
- This is a breaking chnage because the type of
extract
changed - See: https://github.com/dhall-lang/dhall-haskell/pull/1011
- BREAKING CHANGE: Add support for importing expressions
as Location
- This is a breaking change because a new
Location
constructor was added toImportMode
- See: https://github.com/dhall-lang/dhall-haskell/pull/1019
- This is a breaking change because a new
- BREAKING CHANGE: Switch
Var
to use anInt
- This is a performance improvement, but also a breaking change since the
Integer
in theVar
constructor was changed to anInt
- See: https://github.com/dhall-lang/dhall-haskell/pull/1044
- This is a performance improvement, but also a breaking change since the
- BREAKING CHANGE: Add new
toMap
keyword- This is a breaking change to the API because a new
ToMap
constructor was added to theExpr
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: https://github.com/dhall-lang/dhall-haskell/pull/1041
- This is a breaking change to the API because a new
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/1012
- An expression like this one was being incorrectly rejected:
- 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: https://github.com/dhall-lang/dhall-haskell/pull/1027
- BUG FIX: Fix linting of unused let bindings
- Certain let bindings were not correctly detected as unused, which this change fixes
- See: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/1004
- The
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/1024
- BUG FIX:
Dhall.Map
: Reflect original key ordering inOrd
instanceDhall.Map
now considers key order when comparingMap
s, which it should have done before, but didn’t- See: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/1056
- BUG FIX: Make
isNormalized
consistent withnormalize
- BUG FIX: Make
normalizeWithM
consistent withnormalize
- 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: https://github.com/dhall-lang/dhall-haskell/pull/1154
- Feature: New
dhall text
subcommand- This new subcommand supersedes the old
dhall-to-text
executable
- This new subcommand supersedes the old
- Feature: Add
instance Lift (Expr s a)
- Fixes and improvements to error messages:
- Fixes and improvements to tests:
- Performance improvements
- See: https://github.com/dhall-lang/dhall-haskell/pull/1036
- See: https://github.com/dhall-lang/dhall-haskell/pull/1051
- See: https://github.com/dhall-lang/dhall-haskell/pull/1048
- See: https://github.com/dhall-lang/dhall-haskell/pull/1057
- See: https://github.com/dhall-lang/dhall-haskell/pull/1065
- See: https://github.com/dhall-lang/dhall-haskell/pull/1066
- See: https://github.com/dhall-lang/dhall-haskell/pull/1085
1.24.0
- 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
- Expressions like
- 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: https://github.com/dhall-lang/dhall-haskell/pull/965
- e.g.
- 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: https://github.com/dhall-lang/dhall-haskell/pull/967
- Forwarding custom headers could previously fail in various ways, such as:
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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
- An expression such as
- 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 fordhall
commands- In other words, instead of
dhall <<< './some/file
you can now usedhall --file some/file
- See: https://github.com/dhall-lang/dhall-haskell/pull/949
- In other words, instead of
- Feature: New
--cache
flag fordhall freeze
command- This automates the idiom used by the Prelude to optimistically cache imports but gracefully degrade if the semantic integrity check fails
- See: https://github.com/dhall-lang/dhall-haskell/pull/980
- Feature: Add
:clear
command todhall repl
- This deletes previous bindings from the history so that they can be garbage collected
- See: https://github.com/dhall-lang/dhall-haskell/pull/966
- Feature: New
chunkExprs
Traversal
added toDhall.Core
- Feature: New
Dhall.Optics
module- This re-exports some convenient @lens@ utilities used internally for packages trying to avoid a @lens@ dependency
- See: https://github.com/dhall-lang/dhall-haskell/pull/986
- More GHC 8.8 support
1.23.0
- 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: https://github.com/dhall-lang/dhall-haskell/pull/918
- See: https://github.com/dhall-lang/dhall-haskell/pull/927
- See: https://github.com/dhall-lang/dhall-haskell/pull/936
- 1.22.0 introduced two separate bugs in marshaling union literals between
Dhall and Haskell, which this release fixes:
- 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: https://github.com/dhall-lang/dhall-haskell/pull/931
- See: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/891
- The language standard requires that
- 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: https://github.com/dhall-lang/dhall-haskell/pull/937
- This prevents the REPL from expanding
- Support
MonadFail
-related changes in GHC 8.8 - Add
cross
flag to simplify cross-compilation- This allows the
dhall
package to be built without usingTemplateHaskell
- See: https://github.com/dhall-lang/dhall-haskell/pull/928
- This allows the
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/919
- Expand lower bounds on
megaparsec
/transformers-compat
dependencies- This is to support
dhall
on Debian Sid - See: https://github.com/dhall-lang/dhall-haskell/pull/939
- This is to support
1.22.0
- Supports version 7.0.0 of the standard
- BREAKING CHANGE: Add support for empty alternatives
- The
Union
type now has an optional (Maybe
) type for each alternative - See the changelog for standard version 7.0.0 for more details
- See: https://github.com/dhall-lang/dhall-haskell/pull/863
- The
- BREAKING CHANGE: Remove support for URL fragments
- The
URL
type no longer has a field for a URL fragment since the language no longer supports fragments - See the changelog for standard version 7.0.0 for more details
- See: https://github.com/dhall-lang/dhall-haskell/pull/851
- The
- 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: https://github.com/dhall-lang/dhall-haskell/pull/870
- i.e.
- BUG FIX: Fix
dhall encode
bugdhall 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/857
- This fixes some expressions that would previously fail to marshal into
Haskell, specifically those were the marshalling logic was built using
the
- Feature: New
--alpha
flag to α-normalize command-line output - Performance improvements
- The normalizer is now much faster
- See: https://github.com/dhall-lang/dhall-haskell/pull/876
1.21.0
- Supports version 6.0.0 of the language standard
- BREAKING CHANGE: Remove the
constructors
keyword- … as standardized in version 6.0.0 of the language standard
- The deprecation cycle is over, so the keyword is no longer supported
- For more details, see: https://github.com/dhall-lang/dhall-lang/wiki/Migration%3A-Deprecation-of-constructors-keyword
- See: https://github.com/dhall-lang/dhall-haskell/pull/829
- BREAKING CHANGE: CBOR-encode only special
Double
s as half-floats- … as standardized in version 6.0.0 of the language standard
- CBOR
Double
s exceptInfinity
/-Infinity
/NaN
/0.0
are now encoded in at least 32 bits - See: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/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 nestedlet
/in
expressions - See: https://github.com/dhall-lang/dhall-haskell/pull/780
- See: https://github.com/dhall-lang/dhall-haskell/pull/784
- This fixes:
- 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: https://github.com/dhall-lang/dhall-haskell/pull/789
- The interpreter was incorrectly throwing an exception if
- 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 aText
literal) - This comes in handy when using Dhall code to generate JSON or Dhall code
- See: https://github.com/dhall-lang/dhall-haskell/pull/811
- Feature: Add
--immediate-dependencies
/--transitive-dependencies
flags fordhall 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: https://github.com/dhall-lang/dhall-haskell/pull/795
- See: https://github.com/dhall-lang/dhall-haskell/pull/803
- Feature:
dhall freeze
now only freezes remote imports by defaultdhall 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/807
- Feature: Add
:hash
command todhall repl
- This lets you conveniently hash expressions within the
dhall repl
- See: https://github.com/dhall-lang/dhall-haskell/pull/806
- This lets you conveniently hash expressions within the
- Feature: Add
--check
flag todhall 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: https://github.com/dhall-lang/dhall-haskell/pull/810
- Feature: Add
UnionInputType
builder forInputType
s- This is the union analog of
RecordInputType
, letting you build a record explicitly instead of deriving the instance using GHC generics - See: https://github.com/dhall-lang/dhall-haskell/pull/775
- This is the union analog of
- Feature: Add
:set
/:unset
commands todhall 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:
1.20.1
- 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: https://github.com/dhall-lang/dhall-haskell/pull/771
1.20.0
- 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 obsoleteconstructors
keyword for you- See: https://github.com/dhall-lang/dhall-haskell/pull/693
- See: https://github.com/dhall-lang/dhall-haskell/pull/701
- Now the
- BREAKING CHANGE TO THE API: Restore
Parent
constructor forLocal
type- This more closely matches the standard and also enables
dhall format
to produce a leading../
for imports instead of./../
- See: https://github.com/dhall-lang/dhall-haskell/pull/718
- This more closely matches the standard and also enables
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/729
- This changes the REPL to handle previous bindings as if they were
defined using a large
- Feature: Autocomplete for
dhall repl
- You can now auto-complete record fields, union constructors, and identifiers that are in scope
- See: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/739
- Feature: Add support for records of records of types
- You can now nest records of types
- See: https://github.com/dhall-lang/dhall-haskell/pull/700
- Feature: Add
:quit
command fordhall repl
- Feature: Add
--json
flag fordhall {encode,decode}
- You can now produce/consume CBOR expressions via JSON instead of binary
- See: https://github.com/dhall-lang/dhall-haskell/pull/717
- Feature: Add decoding logic for
as Text
- You can now preserve the
as Text
qualifier on imports when serializing them - See: https://github.com/dhall-lang/dhall-haskell/pull/712
- You can now preserve the
- Prenormalize substituted expressions
- This is a performance improvement that reduces the time and memory consumption when normalizing expressions
- See: https://github.com/dhall-lang/dhall-haskell/pull/765
1.19.1
- BUG FIX: Fix serious
dhall lint
bugdhall lint
would sometimes removelet
expressions that were still in use- See: https://github.com/dhall-lang/dhall-haskell/pull/703
- BUG FIX: Fix import caching efficiency bug
- Some imports were being wastefully fetched multiple times
- See: https://github.com/dhall-lang/dhall-haskell/pull/702
- Feature: Generate dot graph to visualize import graph
- Use the
dhall resolve --dot
command - See: https://github.com/dhall-lang/dhall-haskell/pull/698
- See: https://github.com/dhall-lang/dhall-haskell/pull/713
- Use the
- Improve HTTP error messages
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: https://github.com/dhall-lang/dhall-haskell/pull/680
- BREAKING CHANGE TO THE LANGUAGE AND API:
Double
s are now double-precision floating point numbers- This restricts the range of
Double
s to IEEE 754 double-precision floating point - This also implies that you can no longer convert
Scientific
values toDhall
expressions (i.e. noInject
instance forScientific
) - See: https://github.com/dhall-lang/dhall-haskell/pull/667
- This restricts the range of
- BREAKING CHANGE TO THE API: Preserve field order for record projection
- The API uses a new
Dhall.Set.Set
type instead ofData.Set.Set
- See: https://github.com/dhall-lang/dhall-haskell/pull/670
- The API uses a new
- BREAKING CHANGE TO THE API: Add support for multi-
let
expressions- This changes the
Let
constructor to now support storing multiple bindings perlet
expression - See: https://github.com/dhall-lang/dhall-haskell/pull/675
- This changes the
- Access constructors as if they were fields of the union type
- In other words:
< Left : Bool | Right : Natural >.Left
- See: https://github.com/dhall-lang/dhall-haskell/pull/657
- In other words:
- Support GHC 8.6
- Add support for quoted path components
- i.e.
/"foo"/bar/"baz qux"
orhttps://example.com/foo/"bar?baz"?qux
- See: https://github.com/dhall-lang/dhall-haskell/pull/690
- i.e.
- 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: https://github.com/dhall-lang/dhall-haskell/pull/684
1.18.0
- Supports version 3.0.0 of the language standard:
- BREAKING CHANGE TO THE LANGUAGE AND API: New
Some
/None
constructors forOptional
values- Example:
[ Some 1, None Natural ]
- This is a breaking change to the language because
Some
andNone
are now reserved keywords - This is a breaking change to the API because
Some
andNone
are new constructors for theExpr
type
- Example:
- BREAKING CHANGE TO THE LANGUAGE AND API: Support for kind polymorphism
- This adds a new
Sort
constant aboveKind
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 theExpr
type
- This adds a new
- 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
- This replaces
- 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 toStandardVersion
and the --protocol-version
option is renamed to--standard-version
- See: https://github.com/dhall-lang/dhall-haskell/pull/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: https://github.com/dhall-lang/dhall-haskell/pull/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
anddhall decode
subcommands- These allow you to transform Dhall source code to and from its binary representation
- See: https://github.com/dhall-lang/dhall-haskell/pull/588
- LARGE parsing performance improvements
- Parsing is about 10x-100x faster on most code
- See: https://github.com/dhall-lang/dhall-haskell/pull/591
- See: https://github.com/dhall-lang/dhall-haskell/pull/592
- See: https://github.com/dhall-lang/dhall-haskell/pull/597
- See: https://github.com/dhall-lang/dhall-haskell/pull/601
- See: https://github.com/dhall-lang/dhall-haskell/pull/602
- See: https://github.com/dhall-lang/dhall-haskell/pull/604
- See: https://github.com/dhall-lang/dhall-haskell/pull/606
- Type-checking performance improvements:
- Normalization performance improvements:
dhall freeze
now caches the imports as it freezes themdhall freeze
now refreezes imports with invalid semantic integrity checksdhall 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:
1.17.0
- 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: https://github.com/dhall-lang/dhall-haskell/pull/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 matchnormalize
- BUG FIX:
dhall lint
now correctly handles nestedlet
expressions - FEATURE: Imports protected by a semantic integrity check are now cached
- The default
dhall
command no longer outputs the type tostderr
- You can add back the type as a type annotation using the
--annotate
switch - See: https://github.com/dhall-lang/dhall-haskell/pull/544
- You can add back the type as a type annotation using the
- 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
andlettuce
are now legal identifiers - See: https://github.com/dhall-lang/dhall-haskell/pull/551
- i.e.
1.16.1
- Fix test failure due to missing test data file
1.16.0
- BREAKING CHANGE: Consolidate
input
family of functions- These now take a record of options
- This also
_stack
field of theStatus
type from[Import]
toNonEmpty Import
- Permit
$
in quoted variable names
1.15.1
- Fix infinite loop when formatting expressions containing
?
1.15.0
- BREAKING CHANGE TO THE API: Support alternative imports using new
?
operator- This adds a new constructor which affects exhaustive pattern matches
- See: https://github.com/dhall-lang/dhall-haskell/pull/473
- BREAKING CHANGE TO THE API: Add
Integer/toDouble
built-in function- This adds a new constructor which affects exhaustive pattern matches
- See: https://github.com/dhall-lang/dhall-haskell/pull/434
- BREAKING CHANGE TO THE API: Use strict
Text
instead of lazyText
- BREAKING CHANGE TO THE API: Remove
Buildable
in favor ofPretty
- BREAKING CHANGE TO THE API: Removed the
Parent
constructor fromFilePrefix
- Instead, use
Here
with a".."
prefix. - See: https://github.com/dhall-lang/dhall-haskell/pull/407
- Instead, use
- BUG FIX: Disallow duplicate fields in records
- BUG FIX: Fix stripping of leading whitespace in multi-line strings
- BUG FIX: Fix formatting field access of an import
- Add
dhall freeze
command - Add
dhall diff
command - Add
dhall lint
command - Change
dhall-repl
/dhall-hash
/dhall-format
todhall
subcommands- i.e.
dhall repl
/dhall hash
/dhall format
- See: https://github.com/dhall-lang/dhall-haskell/pull/435
- See: https://github.com/dhall-lang/dhall-haskell/pull/452
- i.e.
- Add
with-http
cabal flag to disable support for remote imports - Added
inputFrom
andinputFromWith
- These allow naming the file that the expression is coming from for better error messages
- See: https://github.com/dhall-lang/dhall-haskell/pull/464
- Performance improvements
- Tutorial recommends GitHub for Prelude instead of IPFS
- Pretty-print expressions in type errors
- Formatting improvements
- Diff improvements
1.14.0
- BREAKING CHANGE TO THE LANGUAGE: Switch grammar of
Natural
andInteger
Natural
number literals are now unsigned andInteger
literals always require a sign- This is a VERY disruptive change to most Dhall code in the wild but was unanimously agreed upon here: https://github.com/dhall-lang/dhall-lang/issues/138
- See also: https://github.com/dhall-lang/dhall-haskell/pull/381
- BREAKING CHANGE TO THE LANGUAGE: Drop support for importing directories
- Importing
dir/
used to resolve todir/@
, which is no longer supported - See: https://github.com/dhall-lang/dhall-haskell/pull/384
- Importing
- BREAKING CHANGE TO THE LANGUAGE: Change to the grammar for imports
- File path components can no longer contain
#
or?
characters - URL imports must now contain at least one path component
- URL path components must match the grammar for file path components
- See: https://github.com/dhall-lang/dhall-haskell/pull/390
- File path components can no longer contain
- BREAKING CHANGE TO THE API: Rename
Path{,Mode,Hashed,Type}
toImport{,Mode,Hashed,Type}
- In practice this change is not breaking for the most common use cases
since this also provides a
Path
type synonym for backwards compatibility - See: https://github.com/dhall-lang/dhall-haskell/pull/376
- In practice this change is not breaking for the most common use cases
since this also provides a
- BUG FIX: Fix α-equivalence bug when type-checking
merge
merge
expressions would sometimes reject valid code due to a type-checking bug- See: https://github.com/dhall-lang/dhall-haskell/pull/394
- Improve import caching
- Increase upper bound on
tasty
- Fix lower bound on
insert-ordered-containers
1.13.1
- Increase upper bound on
ansi-terminal
andmegaparsec
1.13.0
- BUG FIX: Fix semantic integrity hashing support
- Both parsing and pretty-printing semantic hashes were broken since version 1.11.0
- See: https://github.com/dhall-lang/dhall-haskell/pull/345
- BUG FIX: Allow leading whitespace in interpolated expresssions
- BUG FIX: Fix
deriving (Interpret)
for sum types- The types of alternatives were not correctly included in the corresponding Dhall type
- See: https://github.com/dhall-lang/dhall-haskell/pull/348
- BREAKING CHANGE TO LANGUAGE: Records cannot store both types and terms
- Records can also not store type-level functions (like
List
)- Records might be allowed to store type-level functions again in the future
- This fixes a potential soundness bug
- The primarily practical consequence of this change is that if you are hosting a “package” then you will need to split terms and types from your package into different records for your users to import
- This also implies removing the
./Monoid
type-level function from the./Prelude/package.dhall
record - See: https://github.com/dhall-lang/dhall-haskell/pull/335
- Records can also not store type-level functions (like
- BREAKING CHANGE TO THE API: Replace
trifecta
withmegaparsec
- This change the API to use the
Parser
type frommegaparsec
- This also slightly changes the type of
exprFromText
- If you program using the type classes provided by the
parsers
library then this is not a breaking change as that interface is preserved - See: https://github.com/dhall-lang/dhall-haskell/pull/268
- This change the API to use the
- BREAKING CHANGE TO THE API: New
⩓
operator for merging record types- Example:
{ foo : Text } ⩓ { bar : Bool } = { foo : Text, bar : Bool }
- This is breaking because it adds a new constructor to the
Expr
type - See: https://github.com/dhall-lang/dhall-haskell/pull/342
- Example:
- BREAKING CHANGE TO THE API: New support for projecting a subset of fields
- Example:
{ x = 1, y = 2, z = 3 }.{ x, y } = { x = 1, y = 2 }
- This is breaking because it adds a new constructor to the
Expr
type - See: https://github.com/dhall-lang/dhall-haskell/pull/350
- Example:
- API+UX feature: New support for pretty-printing diffs of Dhall expressions
- Error messages also use this feature to simplify large type mismatches
- There is also a new
Dhall.Diff
module - See: https://github.com/dhall-lang/dhall-haskell/pull/336
- Add
version
,resolve
,type
, andnormalize
sub-commands to interpreter - Support GHC 7.10.3
:type
command indhall-repl
now only displays the type- Before it would also display the original expression
- See: https://github.com/dhall-lang/dhall-haskell/pull/344
- Trim dependency tree
1.12.0
- Additional changes to support GHC 8.4
- BREAKING CHANGE TO API: Replace dependency on
text-format
withformatting
- This replace the
Data.Text.Buildable.Buildable
instances withFormatting.Buildable.Buildable
instances, which is why this is a breaking change text-format
is no longer maintained and blocking GHC 8.4 support- See: https://github.com/dhall-lang/dhall-haskell/pull/330
- This replace the
1.11.1
- Support GHC 8.4
- Fix α-normalization bug
- Note that this is not a type-checking bug. This only affects users who
were directly using the
alphaNormalize
function from the Haskell API becauselet
expressions were not correctly α-normalized - See: https://github.com/dhall-lang/dhall-haskell/pull/319
- Note that this is not a type-checking bug. This only affects users who
were directly using the
- Slight tweak to syntax highlighting
- Increase upper bound on
ansi-terminal
andexceptions
1.11.0
- BREAKING CHANGE TO THE API: Fix
{Natural,Optional,List}/build
semantics to match standard- This is a breaking change because the
OptionalLit
andListLit
constructors changed their representations to efficiently support the standard semantics ListLit
now stores aData.Sequence.Seq
instead of aData.Vector.Vector
OptionalLit
now stores aMaybe
instead of aData.Vector.Vector
- See: https://github.com/dhall-lang/dhall-haskell/pull/300
- This is a breaking change because the
- BREAKING CHANGE TO THE COMMAND LINE:
dhall
executable always formats output- Previously you had to opt into formatting using
--pretty
- Now formatting is obligatory and the
--pretty
flag is gone - See: https://github.com/dhall-lang/dhall-haskell/pull/303
- Previously you had to opt into formatting using
- Feature: New
:save
command fordhall-repl
- Now you can save an expression to a file:
./yourFile = someExpression
- See: https://github.com/dhall-lang/dhall-haskell/pull/309
- Now you can save an expression to a file:
- Improvement: Add new simplifications to match standard
- Improvement: Fix equivalence check to match standard
- Practically this means that more corner cases of the language correctly type-check than before
- Improvement: New
--plain
flag to disable syntax highlighting - Improvement: Prelude now provides an umbrella
package.dhall
import- This is primarily for convenience
- See: https://github.com/dhall-lang/dhall-haskell/pull/298
- Improvement: Context is now normalized
- Replace
cryptohash
dependency withcryptonite
- Increase upper bound on exceptions
- Fix type error in tutorial
1.10.0
- Feature: Records/unions can now have fields/alternatives that are types
- i.e.
{ foo = Text, bar = List }
is legal now - See: https://github.com/dhall-lang/dhall-haskell/pull/273
- i.e.
- Feature: New
dhall-repl
for interactively evaluating Dhall expressions - Feature: Syntax highlighting
- Feature: BREAKING CHANGE TO THE API:
dhall-format
preserves field order- This changes the syntax tree to use an
InsOrdHashMap
instead of aMap
- This changes the syntax tree to use an
- BREAKING CHANGE TO THE API: Use Haskell’s
Scientific
type- This is fixes the interpreter to correct handle really large/small numbers
- This also allows marshaling into Haskell’s
Scientific
type - See: https://github.com/dhall-lang/dhall-haskell/pull/256
- BREAKING CHANGE TO THE API: Remove
system-filepath
/system-fileio
dependencies- Now the library uses
Prelude.FilePath
- See: https://github.com/dhall-lang/dhall-haskell/pull/248
- Now the library uses
- Feature: Labels can now begin with reserved names
- i.e.
List/map
is now a legal label - See: https://github.com/dhall-lang/dhall-haskell/pull/255
- i.e.
- Fix: Rendered labels are now correctly escaped if they are numbers
- Add the instance
Interpret String
. - Fix: Custom contexts passed to
typeWith
are now checked- This prevents a custom context from triggering an infinite loop
- See: https://github.com/dhall-lang/dhall-haskell/pull/259
1.9.1
dhall-format
now emits single-quoted strings for multi-line strings- Improved error messages for list elements with the wrong type
- Change
lens
dependency tolens-family-core
1.9.0
- Feature: BREAKING CHANGE TO LANGUAGE AND API: Add
constructors
keyword- This new keyword generates constructors from a union type
- See the updated Haskell tutorial for more details
- This means that
constructors
is now a reserved keyword - This adds a new
Constructors
constructor to theExpr
type - See: https://github.com/dhall-lang/dhall-haskell/pull/199
- This new keyword generates constructors from a union type
- Feature: BREAKING CHANGE TO THE API:
dhall-format
preserves interpolation- This changes the
TextLit
constructor to represent an interpolatedText
literal - See: https://github.com/dhall-lang/dhall-haskell/pull/220
- This changes the
- Feature: You can now define type synonyms using
let
- Feature: Extend valid set of quoted labels
- Performance: Improve startup time when importing files, but not URLs
- Security:
localhost
/127.0.0.1
imports no longer count as local imports- Specifically: they cannot import environment variables or files
- See: https://github.com/dhall-lang/dhall-haskell/pull/197
- Security: Fix potential type-checking bug
- Fix: BREAKING CHANGE TO API: Improve localization of error messages
- This required fixing the type of
normalize
/shift
/subst
to preserve the first type parameter ofExpr
(i.e. they no longer deleteNote
constructors) - A new
denote
function was added for the explicit purpose of deletingNote
constructors - See: https://github.com/dhall-lang/dhall-haskell/pull/218
- This required fixing the type of
- Expose
MissingEnvironmentVariable
exception type - Add
genericAuto
- Add
inputWith
- Add
loadWithContext
- Add
pair
/unit
/string
/list
1.8.2
- Add
typeWithA
for type-checking customEmbed
ded values - Fix
dhall{,-*}
executables to ignore ambient locale and use UTF8 - Increase upper bound on
tasty
dependency
1.8.1
dhall
executable can now format output using--pretty
- Improved Unicode suppport on Windows
1.8.0
- BREAKING CHANGE TO LANGUAGE: Add support for import integrity checks
- In practice, the likelihood of this breaking code in the wild is astronomically low
- This would only break code of the form
sha256:aaa...aaa
(i.e. a variabled namedsha256
with a type annotation for a type with a name 64 characters long drawn from the first 6 characters of the alphabet)
- BUG FIX: Fix parsing of single quotes in single-quoted strings
- BUG FIX: Fix superfluous parentheses introduced by
dhall-format
- New
dhall-hash
executable- This goes hand-in-hand with the added support for integrity checks since the executable lets you compute the current hash of an import
1.7.0
- BREAKING CHANGE TO LANGUAGE: Update parser to match standardized grammar
- Trailing commas and bars no longer supported for union and record literals
- Paths no longer permit commas
- URL grammar is now RFC-compliant
- Environment variables can now be quoted to support full range of POSIX-compliant names
- Text literals support full set of JSON escape sequences (such as
\u2192
)
- BREAKING CHANGE TO LANGUAGE: Single quoted strings strip leading newlines
- BUG FIX: Fixed type-checking infinite loops due to non-type-checked variables in context
- BUG FIX: Fixed type-checking bug due to missing context when type-checking certain expressions
- BUG FIX: Fixed type-checking bug due to off-by-one errors in name shadowing logic
- New
dhall-format
executable to automatically format code - Performance optimizations to
Natural/fold
andList/fold
- Improved parsing performance (over 3x faster)
- Union literals can now specify the set value anywhere in the literal
- i.e.
< A : Integer | B = False | C : Text >
- i.e.
- New
Inject
instance for()
- Several tutorial fixes and improvements
1.6.0
- BREAKING CHANGE TO THE API: Drop support for GHC 7.*
- BREAKING CHANGE TO THE API: Add support for customizing Dhall import
- This is a breaking change because this changes the type of
loadWith
- This is a breaking change because this changes the type of
- BREAKING CHANGE TO THE API: Add field to
UnboundVariable
error containing - BUG FIX: Fix parsing single quotes in string literals the name of the unbound variable
- Add
List/concatMap
to the Prelude - You can now derive
Inject
andInterpret
for types with unlabeled fields - Add new instances for
Interpret
:[]
(,)
- Add new instance for
Inject
[]
,Data.Set.Set
,Data.Sequence.Seq
(,)
Int
,Word8
,Word16
,Word32
,Word64
- Add
Eq
instance forSrc
1.5.1
- Increase upper bound on
vector
andoptparse-generic
1.5.0
- BREAKING CHANGE: Add list concatenation operator:
(#)
- This is a breaking change because it adds a new constructor to the
Expr
type which breaks exhaustive pattern matches
- This is a breaking change because it adds a new constructor to the
- BREAKING CHANGE: Add
Interpret
support for lazyText
- This is a breaking change because it renames
text
tostrictText
- This is a breaking change because it renames
- Add
Interpret
instance for decoding (a limited subset of) Dhall functions - Dhall no longer requires Template Haskell to compile
- This helps with cross-compilation
- Add
rawInput
utility for decoding a Haskell value from theExpr
type - Add
loadWith
/normalizeWith
utilities for normalizing/importing modules with a custom context - Export
Type
constructor
1.4.2
- Fix missing
Prelude
files in package archive uploaded to Hackage
1.4.1
- Fix missing
tests/Tutorial.hs
module in package archive uploaded to Hackage
1.4.0
- BREAKING CHANGE TO THE LANGUAGE AND API: You can now supply custom headers for
URL imports with the new
using
keyword- This is a breaking change to the language because this adds a new reserved
using
keyword - This is a breaking change to the API because this adds a new field to the
URL
constructor to store optional custom headers
- This is a breaking change to the language because this adds a new reserved
- BUG FIX:
:
is no longer a disallowed path character- This was breaking URL imports with a port
- BUG FIX: If you import a home-anchored path (i.e.
~/foo
) and that imports a relative path (like./bar
), then the canonical path of the relative import should be home-anchored (i.e.~/bar
). However, there was a bug that made lose the home anchor (i.e../foo/bar
), which this release fixes likely fail due to no longer being home-anchored (i.e. `./foob - Add support for string interpolation
merge
no longer requires a type annotation if you are merging at least one alternative- Expanded Prelude
./Prelude/Optional/all
./Prelude/Optional/any
./Prelude/Optional/filter
./Prelude/Optional/length
./Prelude/Optional/null
./Prelude/Text/concatMap
./Prelude/Text/concatMapSep
./Prelude/Text/concatSep
- Rearrange detailed error messages to put summary information at the bottom of the message
1.3.0
- BREAKING CHANGE TO THE API: Add support for new primitives, specifically:
(//)
- Right-biased and shallow record mergeOptional/build
(now a built-in in order to support build/fold fusion)Natural/show
Integer/show
Double/show
Natural/toInteger
- These all add new constructors to the
Expr
type, which would break exhaustive pattern matches
- BREAKING CHANGE TO THE LANGUAGE: Imported paths and URLs no longer support
the characters: “()[]{}<>:”
- This reduces the number of cases where you have to add a space after imports
- Note that this does not exclude the
:
in the URL scheme (i.e.http://
)
- Increase connection timeout for imports
- Variable names now allow the
-
character for all but the first character - You can now escape identifiers with backticks
- This lets you name identifiers so that they don’t conflict with reserved key words
- This is most useful when converting Dhall to other file formats (like JSON) where you might need to emit a field that conflicts with one of Dhall’s reserved keywords
- New
--version
flag for thedhall
executable
1.2.0
- BREAKING CHANGE: Add support for customizing derived
Interpret
instances- This is a breaking change to the Dhall library API since this changes the
signature of the
Interpret
class by replacing theauto
method with a more generalautoWith
method. ThisautoWith
now takes anInterpretOptions
argument that lets you customize derived field and constuctor names - In practice user programs that use the common path will be unaffected by this change
- This is not a breaking change to the Dhall language
- This is a breaking change to the Dhall library API since this changes the
signature of the
- BREAKING CHANGE: Type annotations now bind more tightly than lambda
abstraction
-
This is a breaking change to the Dhall language. An expression like this:
λ(x : A) → y : B
… used to parenthesized implicitly as:
(λ(x : A) → y) : T
… but is now parenthesized implicitly as:
λ(x : A) → (y : T)
This is now consistent with Haskell’s precedence and also consistent with the precedence of
List
andOptional
type annotations -
This change affects programs with an expression like this:
-- Assuming that `y : B` λ(x : A) → y : A → B
The above program would type-check before this change but not type-check after this change. You would you need to fix the above program by either changing the type signature to annotate just the type of
y
like this:λ(x : A) → y : B
… or by adding explicit parentheses like this:
(λ(x : A) → y) : A → B
-
This is not a breaking change to the Dhall library API
-
- BREAKING CHANGE: Add support for importing a path’s contents as raw
Text
by addingas Text
after the import-
This is a breaking change to the Dhall language
-
This is technically a breaking change, but is extremely unlikely to affect you program. This only changes the behavior of old programs that had an expression of the form:
/some/imported/function as Text
… where
/some/imported/function
is an imported function being applied to two arguments, the first of which is a bound variable namedas
and the second of which is the typeText
-
This is not a breaking change to the Dhall library API
-
- BREAKING CHANGE: Add support for importing environment variables using
env:VAR
syntax-
This is a breaking change to the Dhall library API since it adds a new
Path
constructor -
This also technically a breaking change to the Dhall language but extremely unlikely to affect your program. This only changes the behavior of old programs that had an expression of the form:
env:VAR
… where
env
was the name of a bound variable and:VAR
was a type annotation without spaces around the type annotation operatorAfter this change the program would be interpreted as an import of the contents for the environment variable named
VAR
-
- BREAKING CHANGE: Support importing paths relative to home directory using
~/some/path
syntax- This is a breaking change to the Dhall library API since it adds a new
field to the
File
constructor indicating whether or not the imported path is relative to the home directory - This is not a breaking change to the Dhall language and the new syntax does not override any old syntax
- This is a breaking change to the Dhall library API since it adds a new
field to the
- Permit trailing commas and bars in record/union syntax
- Improve location information for parsing errors
1.1.0
- BREAKING CHANGE: Non-empty lists no longer require a type annotation
- This is a breaking change to the Haskell library, not the Dhall language
- This change does not break existing Dhall programs
- The
Expr
type was modified in a non-backwards-compatible way
- Add new
exprA
parser - Add new
InvalidType
exception ifinput
fails on an invalidType
- Improve documentation and tutorial
1.0.2
- Add support for Nix-style “double single-quote” multi-line string literals
- Add
isNormalized
- Improve documentation and tutorial
- Build against wider range of
http-client
versions
1.0.1
- Initial release
1.0.0
- Accidental premature upload to Hackage. This release was blacklisted