Fixes https://github.com/dhall-lang/dhall-haskell/issues/882
This allows users to supply the Dhall expression by path instead of via
standard input. This also ensures that transitive imports are resolved
appropriately relative to the file's path.
In other words, instead of this:
```
$ dhall <<< './foo/bar.dhall'
```
Users can now do:
```
$ dhall --file foo/bar.dhall
```
Before, `dhall-to-json`/`dhall-to-yaml` would use approximate
representations for special `Double` values. Specifically, `NaN`
would encode as `null` and `±Infinity` would encode as the minimum
and maximum `Double` values.
After this change, YAML will now use `nan`/`inf`/`-inf` to encode
these values (since special `Double` values are natively supported
by YAML) and the JSON encoding will reject them by default. The
user can restore the old behavior for the JSON encoding by enabling
the `--approximate-special-doubles` flag.
Allow to generare quoted scalars if needed via providing a custom encode
options to Data.Yaml.encodeWith. So far two corner cases from yaml
itself (an empty scalar, and special strings) are omitted in the
implementation.
It had bitrotted and wasn't presently building; evidently no-one was
missing it. LTS 6 is actively checked by CI, so while this loses some
coverage of dependency versions in the middle of the range, it doesn't
shrink the overall range of dependencies tested.
Closes#921.
This adds a new `Dhall.Test.Util.discover` utility for auto-generating
a `TestTree` from a directory tree. This simplifies keeping up to date
with changes to the standard test suite.
- Dhall.Eval: new evaluator, conversion checker and normalizer.
There is no standalone alpha normalizer yet.
- There is a new option "new-normalize" for dhall executable, which uses
the new normalizer.
- Type checker is unchanged.
- new implementation: alphaNormalize, judgmentallyEqual, normalize
- normalizeWith takes a Maybe ReifiedNormalizer argument now, and switches to
the new evaluator whenever the input normalizer is Nothing
- QuickCheck test for isNormalized removed, because we don't support evaluation
of ill-typed terms, which the test would require.
* Use lts-12
* Remove cache on fail and add workaround to fix build with stack
* Add dhall-lsp-server to lts-12
* Commenting out default stack.yaml
* Bump up megaparsec version
* Initial draft of the json-to-dhall tool
* Homogenous JSON maps -> Dhall association lists. Bower example.
* Default conversion options. Ghci examples in function annotations.
* Added type signature to text color highlighting functions (error
reporing)
* Removed TypeApplications extension
* Explicit semigroups
* Disable ghc < 8.0 build
* Type specifications for 'None's (e.g. None Integer instead of just None)
* New style for unions, e.g.: < Left : Text | Right : Integer >.Right +1
This no longer tests dependencies, mainly to lower my maintenance burden. In
particular, this makes it easier for me to test bumping dependencies for
Stackage-related bounds changes.
Some things have changed in the dhall expression tree:
- `let` bindings now take a list of bindings
- `Some` and `None` were introduced
- `Text/show` was added
Additionally, dhall switched to an internal `Map` module instead of
`HashMap.Strict.InsOrd`.
Closes: https://github.com/dhall-lang/dhall-nix/issues/18