From 9cb8a656d340665c4beba5374f10482ce41b53ee Mon Sep 17 00:00:00 2001 From: Potato Hatsue <1793913507@qq.com> Date: Sun, 4 Apr 2021 18:17:23 +0800 Subject: [PATCH] Add bounds for Diff (#1665) --- ghcide/ghcide.cabal | 2 +- hls-plugin-api/hls-plugin-api.cabal | 37 +++++++++------- plugins/hls-eval-plugin/hls-eval-plugin.cabal | 9 ++-- .../hls-hlint-plugin/hls-hlint-plugin.cabal | 42 +++++++++++-------- 4 files changed, 51 insertions(+), 39 deletions(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 3086f0b422..4cfc57a1e4 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -84,7 +84,7 @@ library utf8-string, vector, hslogger, - Diff, + Diff ^>=0.4.0, vector, bytestring-encoding, opentelemetry >=0.6.1, diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index b3189b6f2a..5d65d5a7c6 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -4,7 +4,10 @@ version: 1.1.0.0 synopsis: Haskell Language Server API for plugin communication description: Please see the README on GitHub at -homepage: https://github.com/haskell/haskell-language-server/hls-plugin-api + +homepage: + https://github.com/haskell/haskell-language-server/hls-plugin-api + bug-reports: https://github.com/haskell/haskell-language-server/issues license: Apache-2.0 license-file: LICENSE @@ -32,38 +35,42 @@ library Ide.PluginUtils Ide.Types - hs-source-dirs: src + hs-source-dirs: src build-depends: , aeson , base >=4.12 && <5 , containers , data-default - , Diff - , lsp ^>=1.2.0 + , dependent-map + , dependent-sum + , Diff ^>=0.4.0 + , dlist , hashable , hslogger , lens + , lsp ^>=1.2.0 + , opentelemetry , process , regex-tdfa >=1.3.1.0 , shake >=0.17.5 , text , unordered-containers - , dependent-map - , dependent-sum - , dlist - , opentelemetry if os(windows) - build-depends: - Win32 + build-depends: Win32 + else - build-depends: - unix + build-depends: unix - ghc-options: -Wall -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors + ghc-options: + -Wall -Wredundant-constraints -Wno-name-shadowing + -Wno-unticked-promoted-constructors if flag(pedantic) ghc-options: -Werror - default-language: Haskell2010 - default-extensions: DataKinds, KindSignatures, TypeOperators + default-language: Haskell2010 + default-extensions: + DataKinds + KindSignatures + TypeOperators diff --git a/plugins/hls-eval-plugin/hls-eval-plugin.cabal b/plugins/hls-eval-plugin/hls-eval-plugin.cabal index 7b2dcaf957..dc82d0a5de 100644 --- a/plugins/hls-eval-plugin/hls-eval-plugin.cabal +++ b/plugins/hls-eval-plugin/hls-eval-plugin.cabal @@ -19,11 +19,11 @@ build-type: Simple extra-source-files: LICENSE README.md - test/testdata/*.yaml - test/testdata/*.hs + test/testdata/*.cabal test/testdata/*.expected + test/testdata/*.hs test/testdata/*.lhs - test/testdata/*.cabal + test/testdata/*.yaml flag pedantic description: Enable -Werror @@ -53,7 +53,7 @@ library , base >=4.12 && <5 , containers , deepseq - , Diff + , Diff ^>=0.4.0 , directory , dlist , extra @@ -111,7 +111,6 @@ test-suite tests build-tool-depends: hls-eval-plugin:test-server -any hs-source-dirs: test main-is: Main.hs - build-depends: , aeson , base diff --git a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal index b181bdc46c..0bed2ebb6f 100644 --- a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal +++ b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal @@ -2,7 +2,9 @@ cabal-version: 2.2 name: hls-hlint-plugin version: 1.0.0.1 synopsis: Hlint integration plugin with Haskell Language Server -description: Please see Haskell Language Server Readme (https://github.com/haskell/haskell-language-server#readme) +description: + Please see Haskell Language Server Readme (https://github.com/haskell/haskell-language-server#readme) + license: Apache-2.0 license-file: LICENSE author: The Haskell IDE Team @@ -23,29 +25,29 @@ flag ghc-lib Force dependency on ghc-lib-parser even if GHC API in the ghc package is supported library - exposed-modules: Ide.Plugin.Hlint - hs-source-dirs: src + exposed-modules: Ide.Plugin.Hlint + hs-source-dirs: src build-depends: , aeson - , apply-refact >=0.9 - , base >=4.12 && <5 + , apply-refact >=0.9 + , base >=4.12 && <5 , binary , bytestring , containers , data-default , deepseq - , Diff + , Diff ^>=0.4.0 , directory , extra , filepath - , ghc-exactprint >=0.6.3.4 - , ghcide ^>= 1.1.0.0 + , ghc-exactprint >=0.6.3.4 + , ghcide ^>=1.1.0.0 , hashable - , lsp - , hlint >=3.2 - , hls-plugin-api >= 1.0 && < 1.2 + , hlint >=3.2 + , hls-plugin-api >=1.0 && <1.2 , hslogger , lens + , lsp , regex-tdfa , shake , temporary @@ -53,21 +55,25 @@ library , transformers , unordered-containers - if (!flag(ghc-lib) && impl(ghc >=8.10.1) && impl(ghc <9.0.0)) - build-depends: ghc ^>= 8.10 + if ((!flag(ghc-lib) && impl(ghc >=8.10.1)) && impl(ghc <9.0.0)) + build-depends: ghc ^>=8.10 else build-depends: , ghc - , ghc-lib ^>= 8.10.4.20210206 - , ghc-lib-parser-ex ^>= 8.10 + , ghc-lib ^>=8.10.4.20210206 + , ghc-lib-parser-ex ^>=8.10 cpp-options: -DHLINT_ON_GHC_LIB - ghc-options: -Wall -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors + ghc-options: + -Wall -Wredundant-constraints -Wno-name-shadowing + -Wno-unticked-promoted-constructors if flag(pedantic) ghc-options: -Werror - default-language: Haskell2010 - default-extensions: DataKinds, TypeOperators + default-language: Haskell2010 + default-extensions: + DataKinds + TypeOperators