hls-retrie-plugin 1.0.2.0 → 1.0.2.1
raw patch · 2 files changed
+10/−10 lines, 2 filesdep ~ghcidedep ~hls-plugin-apinew-uploaderPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghcide, hls-plugin-api
API changes (from Hackage documentation)
Files
- hls-retrie-plugin.cabal +3/−3
- src/Ide/Plugin/Retrie.hs +7/−7
hls-retrie-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hls-retrie-plugin-version: 1.0.2.0+version: 1.0.2.1 synopsis: Retrie integration plugin for Haskell Language Server description: Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -24,9 +24,9 @@ , directory , extra , ghc- , ghcide ^>=1.6+ , ghcide ^>=1.7 , hashable- , hls-plugin-api ^>=1.3+ , hls-plugin-api ^>=1.4 , lsp , lsp-types , retrie >=0.1.1.0
src/Ide/Plugin/Retrie.hs view
@@ -32,9 +32,9 @@ Value (Null), genericParseJSON) import qualified Data.Aeson as Aeson-import qualified Data.ByteString as BS import Data.Bifunctor (Bifunctor (first), second)+import qualified Data.ByteString as BS import Data.Coerce import Data.Either (partitionEithers) import qualified Data.HashMap.Strict as HM@@ -167,7 +167,7 @@ extractImports :: ModSummary -> [HsBindLR GhcRn GhcRn] -> RewriteSpec -> [ImportSpec] extractImports ModSummary{ms_mod} topLevelBinds (Unfold thing) | Just FunBind {fun_matches}- <- find (\case FunBind{fun_id = L _ n} -> prettyPrint n == thing ; _ -> False) topLevelBinds+ <- find (\case FunBind{fun_id = L _ n} -> T.unpack (printOutputable n) == thing ; _ -> False) topLevelBinds , names <- listify p fun_matches = [ AddImport {..}@@ -249,8 +249,8 @@ [(T.Text, CodeActionKind, RunRetrieParams)] suggestBindRewrites originatingFile pos ms_mod FunBind {fun_id = L l' rdrName} | pos `isInsideSrcSpan` l' =- let pprName = prettyPrint rdrName- pprNameText = T.pack pprName+ let pprNameText = printOutputable rdrName+ pprName = T.unpack pprNameText unfoldRewrite restrictToOriginatingFile = let rewrites = [Unfold (qualify ms_mod pprName)] description = "Unfold " <> pprNameText <> describeRestriction restrictToOriginatingFile@@ -273,8 +273,8 @@ TyClDecl pass -> [(T.Text, CodeActionKind, RunRetrieParams)] suggestTypeRewrites originatingFile ms_mod SynDecl {tcdLName = L _ rdrName} =- let pprName = prettyPrint rdrName- pprNameText = T.pack pprName+ let pprNameText = printOutputable rdrName+ pprName = T.unpack pprNameText unfoldRewrite restrictToOriginatingFile = let rewrites = [TypeForward (qualify ms_mod pprName)] description = "Unfold " <> pprNameText <> describeRestriction restrictToOriginatingFile@@ -330,7 +330,7 @@ suggestRuleRewrites _ _ _ _ = [] qualify :: GHC.Module -> String -> String-qualify ms_mod x = prettyPrint ms_mod <> "." <> x+qualify ms_mod x = T.unpack (printOutputable ms_mod) <> "." <> x ------------------------------------------------------------------------------- -- Retrie driving code