dhall-haskell/dhall-lsp-server/dhall-lsp-server.cabal

142 lines
3.3 KiB
Plaintext
Raw Normal View History

2019-03-07 06:41:38 +01:00
cabal-version: 1.12
name: dhall-lsp-server
2019-03-08 15:24:54 +01:00
version: 0.1.0.1
2019-03-07 06:41:38 +01:00
description: Please see the README on GitHub at <https://github.com/githubuser/dhall-lsp-server#readme>
homepage: https://github.com/dhall-lang/dhall-haskell/dhall-lsp-server#readme
bug-reports: https://github.com/dhall-lang/dhall-haskell/issues
author: panaeon
maintainer: panaeon
copyright: 2019 panaeon
license: MIT
license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
ChangeLog.md
source-repository head
type: git
location: https://github.com/dhall-lang/dhall-haskell
library
exposed-modules:
Dhall.LSP.Backend.Dhall
Dhall.LSP.Backend.Diagnostics
Dhall.LSP.Backend.Formatting
Dhall.LSP.Backend.Linting
Dhall.LSP.Backend.ToJSON
Dhall.LSP.Backend.Typing
Dhall.LSP.Handlers
Dhall.LSP.Handlers.Command
Dhall.LSP.Handlers.Diagnostics
Dhall.LSP.Handlers.DocumentFormatting
Dhall.LSP.Handlers.Hover
Dhall.LSP.Server
2019-03-07 06:41:38 +01:00
other-modules:
Paths_dhall_lsp_server
Dhall.LSP.Util
2019-03-07 06:41:38 +01:00
hs-source-dirs:
src
default-extensions: LambdaCase OverloadedStrings FlexibleInstances TypeApplications RecordWildCards ScopedTypeVariables
build-depends:
aeson
, aeson-pretty
, base >=4.7 && <5
, bytestring
2019-03-07 06:41:38 +01:00
, containers
, data-default
, dhall
, dhall-json
2019-03-07 06:41:38 +01:00
, filepath
, haskell-lsp
, hslogger
, lens
, lens-family-core
, megaparsec
, mtl
, optparse-applicative
, prettyprinter
, sorted-list
, stm
, text
, transformers
, unordered-containers
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
, uri-encode
2019-03-07 06:41:38 +01:00
, yi-rope
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-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
default-extensions: LambdaCase OverloadedStrings FlexibleInstances TypeApplications RecordWildCards ScopedTypeVariables
ghc-options: -rtsopts
build-depends:
aeson
, base >=4.7 && <5
2019-03-07 06:41:38 +01:00
, containers
, data-default
, dhall
, dhall-lsp-server
, filepath
, haskell-lsp
, hslogger
, lens
, lens-family-core
, megaparsec
, mtl
, optparse-applicative
, prettyprinter
, sorted-list
, stm
, text
, transformers
, unordered-containers
, yi-rope
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-03-07 06:41:38 +01:00
test-suite dhall-lsp-server-test
type: exitcode-stdio-1.0
main-is: Driver.hs
2019-03-07 06:41:38 +01:00
other-modules:
Paths_dhall_lsp_server
Backend.Dhall.DiagnosticsSpec
2019-03-07 06:41:38 +01:00
hs-source-dirs:
test
default-extensions: LambdaCase OverloadedStrings FlexibleInstances TypeApplications RecordWildCards ScopedTypeVariables
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: -threaded -rtsopts -with-rtsopts=-N -Wall
build-tool-depends:
tasty-discover:tasty-discover
2019-03-07 06:41:38 +01:00
build-depends:
aeson
, base >=4.7 && <5
2019-03-07 06:41:38 +01:00
, containers
, data-default
, dhall
, dhall-lsp-server
, filepath
, haskell-lsp
, hslogger
, lens
, lens-family-core
, megaparsec
, mtl
, optparse-applicative
, prettyprinter
, sorted-list
, stm
, tasty
, tasty-discover
, tasty-hspec
, tasty-quickcheck
, text
, transformers
, unordered-containers
, yi-rope
default-language: Haskell2010