Fixes#509
The `Dhall.Import.HTTP` module had logic for pretty-printing HTTP error
message, but this logic wasn't being used anywhere! This change fixes
that and also polishes the error messages a little bit.
* Add dotgen as a dependency
Signed-off-by: Basile Henry <bjm.henry@gmail.com>
* Build up dot graph while resolving imports
Signed-off-by: Basile Henry <bjm.henry@gmail.com>
* Add --dot option to resolve in CLI
Signed-off-by: Basile Henry <bjm.henry@gmail.com>
* Handle diamond dependencies in dot graph
* Refactor dot graph generation
`dhall lint` was incorrectly deleting `let` bindings that are being used
due to not checking other `let` bindings within the same multi-`let`
expression for free variable occurrences.
This change fixes that and adds the first regression test for `dhall
lint`
This begins updates the filesystem layout for the tests to match
the new layout from the standard test suite (See:
https://github.com/dhall-lang/dhall-lang/pull/265)
This is still missing a part of the standard requirement, which is checking
parsing and import test results against an expected output (instead of
just checking that they succeed). I plan to add that in a subsequent
pull request. This is mainly to unblock other features that require using
the new standard layout.
The issue was that the parser was attempting to parse // first, which
will succeed on the prefix of //\\, then the parser will get an error
because it expects a sub expression but the input is \\.
The motivation for this change is:
* To catch build failures in downstream packages whenever we make a breaking
change to the `dhall` API
* To reduce the amount of work I need in order to cut a release for all of
these packages
* To better share Nix/CI-related logic between the projects
Note that I have not yet migrated `dhall-nix` in. I'm waiting for
https://github.com/dhall-lang/dhall-nix/issues/17 to be fixed since
`dhall-nix` is incompatible with later versions of `megaparsec` due to
`hnix`.