2019-03-07 06:41:38 +01:00
|
|
|
name: dhall-lsp-server
|
2019-12-06 04:28:39 +01:00
|
|
|
Version: 1.0.3
|
|
|
|
cabal-version: 1.12
|
2019-08-29 19:07:08 +02:00
|
|
|
synopsis: Language Server Protocol (LSP) server for Dhall
|
2019-03-07 06:41:38 +01:00
|
|
|
homepage: https://github.com/dhall-lang/dhall-haskell/dhall-lsp-server#readme
|
|
|
|
bug-reports: https://github.com/dhall-lang/dhall-haskell/issues
|
|
|
|
author: panaeon
|
2019-07-29 06:46:32 +02:00
|
|
|
maintainer: Gabriel Gonzalez
|
2019-03-07 06:41:38 +01:00
|
|
|
copyright: 2019 panaeon
|
|
|
|
license: MIT
|
|
|
|
license-file: LICENSE
|
|
|
|
build-type: Simple
|
|
|
|
extra-source-files:
|
|
|
|
README.md
|
|
|
|
ChangeLog.md
|
2019-10-10 04:27:15 +02:00
|
|
|
tests/fixtures/completion/*.dhall
|
|
|
|
tests/fixtures/diagnostics/*.dhall
|
|
|
|
tests/fixtures/linting/*.dhall
|
|
|
|
tests/fixtures/hovering/*.dhall
|
2019-03-07 06:41:38 +01:00
|
|
|
|
|
|
|
source-repository head
|
|
|
|
type: git
|
|
|
|
location: https://github.com/dhall-lang/dhall-haskell
|
|
|
|
|
|
|
|
library
|
|
|
|
exposed-modules:
|
2019-08-07 16:11:59 +02:00
|
|
|
Dhall.LSP.Backend.Completion
|
2019-06-13 16:23:48 +02:00
|
|
|
Dhall.LSP.Backend.Dhall
|
2019-06-07 09:47:07 +02:00
|
|
|
Dhall.LSP.Backend.Diagnostics
|
2019-07-19 19:24:11 +02:00
|
|
|
Dhall.LSP.Backend.Freezing
|
2019-06-07 09:47:07 +02:00
|
|
|
Dhall.LSP.Backend.Formatting
|
2019-06-11 17:10:16 +02:00
|
|
|
Dhall.LSP.Backend.Linting
|
2019-06-20 18:37:59 +02:00
|
|
|
Dhall.LSP.Backend.Parsing
|
2019-06-13 16:23:48 +02:00
|
|
|
Dhall.LSP.Backend.ToJSON
|
2019-06-17 12:37:38 +02:00
|
|
|
Dhall.LSP.Backend.Typing
|
2019-06-07 09:47:07 +02:00
|
|
|
Dhall.LSP.Handlers
|
|
|
|
Dhall.LSP.Server
|
2019-07-01 19:30:32 +02:00
|
|
|
Dhall.LSP.State
|
2019-03-07 06:41:38 +01:00
|
|
|
other-modules:
|
|
|
|
Paths_dhall_lsp_server
|
2019-06-07 09:47:07 +02:00
|
|
|
Dhall.LSP.Util
|
2019-03-07 06:41:38 +01:00
|
|
|
hs-source-dirs:
|
|
|
|
src
|
2019-08-20 03:35:07 +02:00
|
|
|
default-extensions: RecordWildCards OverloadedStrings
|
2019-03-07 06:41:38 +01:00
|
|
|
build-depends:
|
2019-07-29 06:46:32 +02:00
|
|
|
aeson >= 1.3.1.1 && < 1.5
|
|
|
|
, aeson-pretty >= 0.8.7 && < 0.9
|
2019-10-30 20:23:29 +01:00
|
|
|
, base >= 4.11 && < 5
|
2019-07-29 06:46:32 +02:00
|
|
|
, bytestring >= 0.10.8.2 && < 0.11
|
|
|
|
, containers >= 0.5.11.0 && < 0.7
|
|
|
|
, data-default >= 0.7.1.1 && < 0.8
|
2019-08-07 16:11:59 +02:00
|
|
|
, directory >= 1.2.2.0 && < 1.4
|
2019-12-06 04:28:39 +01:00
|
|
|
, dhall >= 1.28.0 && < 1.29
|
|
|
|
, dhall-json >= 1.4 && < 1.7
|
2019-07-29 06:46:32 +02:00
|
|
|
, filepath >= 1.4.2 && < 1.5
|
2019-10-01 02:24:15 +02:00
|
|
|
, haskell-lsp >= 0.15.0.0 && < 0.17
|
2019-08-07 13:40:43 +02:00
|
|
|
, rope-utf16-splay >= 0.3.1.0 && < 0.4
|
2019-07-29 06:46:32 +02:00
|
|
|
, hslogger >= 1.2.10 && < 1.4
|
2019-09-08 23:41:51 +02:00
|
|
|
, lens >= 4.16.1 && < 4.19
|
2019-07-29 06:46:32 +02:00
|
|
|
, lens-family-core >= 1.2.3 && < 2.1
|
2019-12-03 04:28:06 +01:00
|
|
|
, megaparsec >= 7.0.2 && < 8.1
|
2019-07-29 06:46:32 +02:00
|
|
|
, mtl >= 2.2.2 && < 2.3
|
|
|
|
, network-uri >= 2.6.1.0 && < 2.7
|
2019-11-14 14:43:35 +01:00
|
|
|
, prettyprinter >= 1.5.1 && < 1.6
|
2019-07-29 06:46:32 +02:00
|
|
|
, text >= 1.2.3.0 && < 1.3
|
|
|
|
, transformers >= 0.5.5.0 && < 0.6
|
|
|
|
, unordered-containers >= 0.2.9.0 && < 0.3
|
|
|
|
, uri-encode >= 1.5.0.5 && < 1.6
|
2019-03-07 06:41:38 +01:00
|
|
|
default-language: Haskell2010
|
dhall-lsp-server: Rework diagnostics backend + detailed error messages on hover (#982)
* Refactor Diagnostics backend
This commits refactors Backend.Dhall.Diagnostics, cleaning things up and
adding comments along the way. We also lose Backend.Dhall.DhallErrors.
The user-facing result is a step backwards, as we revert to using Dhall's
Show instances to print errors, which gives us error messages that don't
fit the LSP use case very well at the moment. In the future
we should change Dhall's error printing API (the Show instances) to make
them more generally useful (in particular for the LSP use case), thus
saving us from having to duplicate code (as was previously did, when
dhall-lsp-server was not yet part of the upstream project).
* Proof of concept: Provide detailed error messages
This proof of concept provides detailed explanations on hovering over type
errors. Currently this is done by injecting the explanation directly into
the hover text, which 1. conflicts with the short error messages, which
are still being displayed at the same time and 2. is not particularly
readable, since the explanations are meant to be rendered at least 80
characters wide.
For future work I am planning to instead only add an "explain" link to the
hover window, which when clicked opens the explanation in a separate
window (inspired by how the haskell ide engine presents documentation
links). This will require a small amount of client-side logic.
* Explain error messages via VSCode Command URIs
The first proof of concept simply spit out the explanations as hover text;
in order to make the feature a bit more useful, we now encode the
explanation text into a VSCode command URI (that still needs to be
implemented client-side), so that upon hovering over an error the user is
presented with a clickable "Explain error message" link.
The feature is still in the prototype stage!
* Use custom URI scheme instead of command URIs
Use URIs of the form "dhall-explain:?text" to present detailed
explanations on hovering. Previously we used command URIs, which are
specific to VSCode.
Needs a correspondingly patched vscode-lsp-server to handle the
"dhall-explain" URI scheme.
* Fix handling of relative imports in diagnostics
In refactoring the diagnostics backend I forgot to initialise the settings
passed to the Dhall type-checker, which are needed to properly resolve
relative imports. An easy fix for a silly mistake ;)
* Remove outdated TODO comment
* Make GHC stricter when building dhall-lsp-server
Add -Wall and -fwarn-incomplete-uni-patterns to the GHC options when
building dhall-lsp-server. This brings it in line with the rest of
dhall-haskell.
* Fix warnings when building dhall-lsp-server
* Fix review comments
Fixes Gabriel's PR comments. Note that I leave a proper fix to
DhallException for the future (I want to work on something else for a bit
;)).
* Use underscores to pacify warnings
2019-06-04 18:48:06 +02:00
|
|
|
GHC-Options: -Wall -fwarn-incomplete-uni-patterns
|
2019-06-19 02:45:01 +02:00
|
|
|
if impl(eta)
|
|
|
|
buildable: False
|
|
|
|
|
2019-03-07 06:41:38 +01:00
|
|
|
|
|
|
|
executable dhall-lsp-server
|
|
|
|
main-is: Main.hs
|
|
|
|
other-modules:
|
|
|
|
Paths_dhall_lsp_server
|
|
|
|
hs-source-dirs:
|
|
|
|
app
|
2019-08-20 03:35:07 +02:00
|
|
|
default-extensions: RecordWildCards OverloadedStrings
|
2019-03-07 06:41:38 +01:00
|
|
|
ghc-options: -rtsopts
|
|
|
|
build-depends:
|
2019-08-07 13:40:43 +02:00
|
|
|
base >=4.7 && <5
|
2019-03-07 06:41:38 +01:00
|
|
|
, dhall-lsp-server
|
|
|
|
, optparse-applicative
|
|
|
|
default-language: Haskell2010
|
dhall-lsp-server: Rework diagnostics backend + detailed error messages on hover (#982)
* Refactor Diagnostics backend
This commits refactors Backend.Dhall.Diagnostics, cleaning things up and
adding comments along the way. We also lose Backend.Dhall.DhallErrors.
The user-facing result is a step backwards, as we revert to using Dhall's
Show instances to print errors, which gives us error messages that don't
fit the LSP use case very well at the moment. In the future
we should change Dhall's error printing API (the Show instances) to make
them more generally useful (in particular for the LSP use case), thus
saving us from having to duplicate code (as was previously did, when
dhall-lsp-server was not yet part of the upstream project).
* Proof of concept: Provide detailed error messages
This proof of concept provides detailed explanations on hovering over type
errors. Currently this is done by injecting the explanation directly into
the hover text, which 1. conflicts with the short error messages, which
are still being displayed at the same time and 2. is not particularly
readable, since the explanations are meant to be rendered at least 80
characters wide.
For future work I am planning to instead only add an "explain" link to the
hover window, which when clicked opens the explanation in a separate
window (inspired by how the haskell ide engine presents documentation
links). This will require a small amount of client-side logic.
* Explain error messages via VSCode Command URIs
The first proof of concept simply spit out the explanations as hover text;
in order to make the feature a bit more useful, we now encode the
explanation text into a VSCode command URI (that still needs to be
implemented client-side), so that upon hovering over an error the user is
presented with a clickable "Explain error message" link.
The feature is still in the prototype stage!
* Use custom URI scheme instead of command URIs
Use URIs of the form "dhall-explain:?text" to present detailed
explanations on hovering. Previously we used command URIs, which are
specific to VSCode.
Needs a correspondingly patched vscode-lsp-server to handle the
"dhall-explain" URI scheme.
* Fix handling of relative imports in diagnostics
In refactoring the diagnostics backend I forgot to initialise the settings
passed to the Dhall type-checker, which are needed to properly resolve
relative imports. An easy fix for a silly mistake ;)
* Remove outdated TODO comment
* Make GHC stricter when building dhall-lsp-server
Add -Wall and -fwarn-incomplete-uni-patterns to the GHC options when
building dhall-lsp-server. This brings it in line with the rest of
dhall-haskell.
* Fix warnings when building dhall-lsp-server
* Fix review comments
Fixes Gabriel's PR comments. Note that I leave a proper fix to
DhallException for the future (I want to work on something else for a bit
;)).
* Use underscores to pacify warnings
2019-06-04 18:48:06 +02:00
|
|
|
GHC-Options: -Wall -fwarn-incomplete-uni-patterns
|
2019-06-19 02:45:01 +02:00
|
|
|
if impl(eta)
|
|
|
|
buildable: False
|
2019-03-07 06:41:38 +01:00
|
|
|
|
2019-07-19 19:24:11 +02:00
|
|
|
Test-Suite doctest
|
|
|
|
Type: exitcode-stdio-1.0
|
|
|
|
Hs-Source-Dirs: doctest
|
|
|
|
Main-Is: Main.hs
|
|
|
|
GHC-Options: -Wall
|
|
|
|
Build-Depends:
|
2019-07-29 06:46:32 +02:00
|
|
|
base ,
|
|
|
|
directory >= 1.3.1.5 && < 1.4 ,
|
|
|
|
filepath < 1.5 ,
|
2019-11-02 02:29:26 +01:00
|
|
|
doctest >= 0.7.0 && < 0.17,
|
|
|
|
QuickCheck
|
2019-07-19 19:24:11 +02:00
|
|
|
Other-Extensions: OverloadedStrings RecordWildCards
|
|
|
|
Default-Language: Haskell2010
|
|
|
|
-- `doctest` doesn't work with `MIN_VERSION` macros before GHC 8
|
|
|
|
--
|
|
|
|
-- See: https://ghc.haskell.org/trac/ghc/ticket/10970
|
|
|
|
if impl(ghc < 8.0)
|
|
|
|
Buildable: False
|
2019-10-10 04:27:15 +02:00
|
|
|
|
|
|
|
Test-Suite tests
|
|
|
|
Type: exitcode-stdio-1.0
|
|
|
|
Hs-Source-Dirs: tests
|
|
|
|
Main-Is: Main.hs
|
|
|
|
GHC-Options: -Wall
|
|
|
|
Build-Depends:
|
|
|
|
base ,
|
|
|
|
haskell-lsp-types >= 0.15.0 && < 0.16 ,
|
|
|
|
lsp-test >= 0.6 && < 0.7 ,
|
|
|
|
tasty >= 0.11.2 && < 1.3 ,
|
|
|
|
tasty-hspec >= 1.1 && < 1.2 ,
|
|
|
|
text >= 0.11 && < 1.3
|
|
|
|
Default-Language: Haskell2010
|