8ae7b603fe
* Move "Dot" import graph generation to Dhall.Main Previously `Dhall.Import` would generate the import graph in "dot" format while resolving imports. This change simplifies `Dhall.Import` to only keep track of the adjacency list representing the import graph, moving the logic for generating "dot" files to Dhall.Main. This change will allow us to implement proper cache invalidation for `dhall-lsp-server`. * Correctly invalidate transitive dependencies Fixes dhall-lsp-server`s caching behaviour to correctly invalidate cached imports that (possibly indirectly) depend on the changed file. Example: Suppose we have the following three files: {- In A.dhall -} 2 : ./B.dhall {- In B.dhall -} ./C.dhall {- In C.dhall -} Natural Previously, changing C.dhall to `Text` would not cause `A.dhall` to stop type-checking, since the old version of `B.dhall` (which evaluated to `Natural`) would still have been in the cache. This change fixes that behaviour. * Make edges of import graph self-documenting As suggested by @Gabriel439 * Don't cache expressions manually After computing the diagnostics for a given file we added its normal form to the cache, but forgot to add its dependencies to the dependency graph. This bug points out that keeping the import graph consistent manually is probably not a good idea. With this commit we never mess with the import cache manually; this means that files are only cached once they are depended upon by some other file, potentially causing us to duplicate work (but no more than once). * Fix left-overs from previous commit |
||
---|---|---|
.. | ||
app | ||
src/Dhall/LSP | ||
test | ||
ChangeLog.md | ||
LICENSE | ||
README.md | ||
Setup.hs | ||
default.nix | ||
dhall-lsp-server.cabal | ||
shell.nix |
README.md
dhall-lsp-server
This is a Language Server Protocol server implementation for the Dhall programming language.
For installation or development instructions, see: