Releases: dhall-lang/dhall-haskell
Releases · dhall-lang/dhall-haskell
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 then
dhall 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
- This also makes the implementation more standards-compliant, by treating
- 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 with
Dhall.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
and
Dhall.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 customManager
- You can use this to tweak HTTP request timeouts or use a different TLS
manager (e.g. one fromhttp-client-openssl
)
- Several import-related functions now provide an alternative variants that
- 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
- This was a case of the Haskell implementation not being compliant with the
- 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 todhall {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
- This flag lets you format/lint/freeze a file and all of its transitive
- 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 an
Expector (Expr Src Void)
(essentially anEither
) instead of
Expr 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
- BREAKING CHANGE: Records can no longer contain attributes named after language keywords
- This is a bugfix, because the language standard disallows using
keywords as record labels. However, some users were relying on
this bug. - If you need to use a keyword as a record label, enclose it in backticks:
{ `assert` = 1 }
.
- This is a bugfix, because the language standard disallows using
- 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
- The interpreter will now correct cached expressions that are incorrect
- 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
- This fixes a few subtle bugs in how Dhall unions are marshalled into
- 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
- The behavior now matches the standard. Previously, the Haskell
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.
- The record pun feature introduced in the previous release did not
- 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: