diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index b39fbdff75..3fe34a2132 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -63,7 +63,7 @@ library , cryptohash-sha1 , data-default , ghc - , ghcide ^>= 1.2.0.2 + , ghcide ^>=1.2 , gitrev , lsp , hie-bios diff --git a/hls-test-utils/hls-test-utils.cabal b/hls-test-utils/hls-test-utils.cabal index 2442b7ccdd..79533a6b2d 100644 --- a/hls-test-utils/hls-test-utils.cabal +++ b/hls-test-utils/hls-test-utils.cabal @@ -43,8 +43,8 @@ library , directory , extra , filepath - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , hspec , hspec-core , lens diff --git a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal index d9b772e072..b2964348ca 100644 --- a/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal +++ b/plugins/hls-brittany-plugin/hls-brittany-plugin.cabal @@ -25,8 +25,8 @@ library , filepath , ghc , ghc-boot-th - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lens , lsp-types , text @@ -44,5 +44,5 @@ test-suite tests , base , bytestring , hls-brittany-plugin - , hls-test-utils ^>=1.0.0.0 + , hls-test-utils ^>=1.0 , text diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 3030865b5b..1468aa437c 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -29,8 +29,8 @@ library , containers , ghc , ghc-exactprint - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lens , lsp , shake @@ -56,7 +56,7 @@ test-suite tests , bytestring , filepath , hls-class-plugin - , hls-test-utils ^>= 1.0.0.0 + , hls-test-utils ^>= 1.0 , lens , lsp-test , lsp-types diff --git a/plugins/hls-eval-plugin/hls-eval-plugin.cabal b/plugins/hls-eval-plugin/hls-eval-plugin.cabal index 53eba2a53d..f96614d114 100644 --- a/plugins/hls-eval-plugin/hls-eval-plugin.cabal +++ b/plugins/hls-eval-plugin/hls-eval-plugin.cabal @@ -61,9 +61,9 @@ library , ghc , ghc-boot-th , ghc-paths - , ghcide ^>=1.2.0.2 + , ghcide ^>=1.2 , hashable - , hls-plugin-api ^>=1.1.0.0 + , hls-plugin-api ^>=1.1 , lens , lsp , lsp-types @@ -105,7 +105,7 @@ test-suite tests , extra , filepath , hls-eval-plugin - , hls-test-utils ^>=1.0.0.0 + , hls-test-utils ^>=1.0 , lens , lsp-test , lsp-types diff --git a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal index 6985aaacf1..f23dbb11ef 100644 --- a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal +++ b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal @@ -21,8 +21,8 @@ library , containers , deepseq , ghc - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lsp , lsp-types , shake diff --git a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal index c46ea8b42f..aae85727f6 100644 --- a/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal +++ b/plugins/hls-haddock-comments-plugin/hls-haddock-comments-plugin.cabal @@ -29,8 +29,8 @@ library , containers , ghc , ghc-exactprint - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lsp-types , text , unordered-containers @@ -51,5 +51,5 @@ test-suite tests , bytestring , filepath , hls-haddock-comments-plugin - , hls-test-utils ^>= 1.0.0.0 + , hls-test-utils ^>= 1.0 , text diff --git a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal index 158804bc36..f5ff2b66fc 100644 --- a/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal +++ b/plugins/hls-hlint-plugin/hls-hlint-plugin.cabal @@ -41,10 +41,10 @@ library , extra , filepath , ghc-exactprint >=0.6.3.4 - , ghcide ^>=1.2.0.2 + , ghcide ^>=1.2 , hashable , hlint >=3.2 - , hls-plugin-api ^>=1.1.0.0 + , hls-plugin-api ^>=1.1 , hslogger , lens , lsp diff --git a/plugins/hls-refine-imports-plugin/hls-refine-imports-plugin.cabal b/plugins/hls-refine-imports-plugin/hls-refine-imports-plugin.cabal new file mode 100644 index 0000000000..d2594569df --- /dev/null +++ b/plugins/hls-refine-imports-plugin/hls-refine-imports-plugin.cabal @@ -0,0 +1,47 @@ +cabal-version: 2.2 +name: hls-refine-imports-plugin +version: 1.0.0.0 +synopsis: Refine imports plugin for Haskell Language Server +license: Apache-2.0 +license-file: LICENSE +author: rayshih +maintainer: mnf.shih@gmail.com +category: Development +build-type: Simple +extra-source-files: + LICENSE + +library + exposed-modules: Ide.Plugin.RefineImports + hs-source-dirs: src + build-depends: + , aeson + , base >=4.12 && <5 + , containers + , deepseq + , ghc + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 + , lsp + , lsp-types + , hls-graph + , text + , unordered-containers + , hls-explicit-imports-plugin ^>= 1.0.0.1 + + default-language: Haskell2010 + default-extensions: DataKinds, TypeOperators + +test-suite tests + type: exitcode-stdio-1.0 + default-language: Haskell2010 + hs-source-dirs: test + main-is: Main.hs + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + , base + , bytestring + , filepath + , hls-refine-imports-plugin + , hls-test-utils + , text diff --git a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal index 3a8ddae850..5f71bba354 100644 --- a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal +++ b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal @@ -23,9 +23,9 @@ library , directory , extra , ghc - , ghcide ^>=1.2.0.2 + , ghcide ^>=1.2 , hashable - , hls-plugin-api ^>=1.1.0.0 + , hls-plugin-api ^>=1.1 , lsp , lsp-types , retrie >=0.1.1.0 diff --git a/plugins/hls-splice-plugin/hls-splice-plugin.cabal b/plugins/hls-splice-plugin/hls-splice-plugin.cabal index c6a291e174..0f2b470377 100644 --- a/plugins/hls-splice-plugin/hls-splice-plugin.cabal +++ b/plugins/hls-splice-plugin/hls-splice-plugin.cabal @@ -40,8 +40,8 @@ library , foldl , ghc , ghc-exactprint - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lens , lsp , retrie @@ -69,5 +69,5 @@ test-suite tests , extra , filepath , hls-splice-plugin - , hls-test-utils ^>= 1.0.0.0 + , hls-test-utils ^>= 1.0 , text diff --git a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal index f480f71faf..a421941735 100644 --- a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal +++ b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal @@ -22,8 +22,8 @@ library , filepath , ghc , ghc-boot-th - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lsp-types , mtl , stylish-haskell ^>=0.12 @@ -41,5 +41,5 @@ test-suite tests , base , bytestring , hls-stylish-haskell-plugin - , hls-test-utils ^>= 1.0.0.0 + , hls-test-utils ^>= 1.0 , text diff --git a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal index aff9d3f087..42c1bb1fed 100644 --- a/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal +++ b/plugins/hls-tactics-plugin/hls-tactics-plugin.cabal @@ -72,8 +72,8 @@ library , ghc-boot-th , ghc-exactprint , ghc-source-gen - , ghcide ^>=1.2.0.2 - , hls-plugin-api ^>=1.1.0.0 + , ghcide ^>=1.2 + , hls-plugin-api ^>=1.1 , lens , lsp , mtl @@ -141,7 +141,7 @@ test-suite tests , ghcide , hls-plugin-api , hls-tactics-plugin - , hls-test-utils ^>= 1.0.0.0 + , hls-test-utils ^>= 1.0 , hspec , hspec-expectations , lens