packages feed

hls-retrie-plugin 1.0.1.2 → 1.0.1.3

raw patch · 2 files changed

+16/−31 lines, 2 filesdep −ghc-api-compatdep ~ghcide

Dependencies removed: ghc-api-compat

Dependency ranges changed: ghcide

Files

hls-retrie-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               hls-retrie-plugin-version:            1.0.1.2+version:            1.0.1.3 synopsis:           Retrie integration plugin for Haskell Language Server description:   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>@@ -23,7 +23,7 @@     , directory     , extra     , ghc-    , ghcide                >=1.2     && <1.5+    , ghcide                >=1.2     && <1.6     , hashable     , hls-plugin-api        >=1.1     && <1.3     , lsp@@ -33,22 +33,6 @@     , text     , transformers     , unordered-containers--  if impl(ghc < 8.10.5)-    build-depends:-      ghc-api-compat ==8.6-  elif impl(ghc == 8.10.5)-    build-depends:-      ghc-api-compat ==8.10.5-  elif impl(ghc == 8.10.6)-    build-depends:-      ghc-api-compat ==8.10.6-  elif impl(ghc == 8.10.7)-    build-depends:-      ghc-api-compat ==8.10.7-  elif impl(ghc == 9.0.1)-    build-depends:-      ghc-api-compat ==9.0.1    default-language:   Haskell2010   default-extensions:
src/Ide/Plugin/Retrie.hs view
@@ -57,28 +57,30 @@                                                        HscEnv, IdP, LRuleDecls,                                                        ModSummary (ModSummary, ms_hspp_buf, ms_mod),                                                        NHsValBindsLR (..),+                                                       Outputable,                                                        ParsedModule (..),                                                        RuleDecl (HsRule),                                                        RuleDecls (HsRules),+                                                       SourceText (..),                                                        SrcSpan (..),                                                        TyClDecl (SynDecl),                                                        TyClGroup (..), fun_id,+                                                       hm_iface, isQual,+                                                       isQual_maybe,                                                        mi_fixities,                                                        moduleNameString,+                                                       nameModule_maybe,+                                                       nameRdrName, occNameFS,+                                                       occNameString,                                                        parseModule,                                                        pattern IsBoot,                                                        pattern NotBoot,-                                                       pattern OldRealSrcSpan,-                                                       rds_rules, srcSpanFile)+                                                       pattern RealSrcSpan,+                                                       rdrNameOcc, rds_rules,+                                                       srcSpanFile)+import           Development.IDE.GHC.Compat.Util      hiding (catch, try)+import qualified GHC                                  (parseModule) import           GHC.Generics                         (Generic)-import           GhcPlugins                           (Outputable,-                                                       SourceText (NoSourceText),-                                                       hm_iface, isQual,-                                                       isQual_maybe,-                                                       nameModule_maybe,-                                                       nameRdrName, occNameFS,-                                                       occNameString,-                                                       rdrNameOcc, unpackFS) import           Ide.PluginUtils import           Ide.Types import           Language.LSP.Server                  (LspM,@@ -106,7 +108,6 @@ import           Retrie.Rewrites import           Retrie.SYB                           (listify) import           Retrie.Util                          (Verbosity (Loud))-import           StringBuffer                         (stringToStringBuffer) import           System.Directory                     (makeAbsolute)  descriptor :: PluginId -> PluginDescriptor IdeState@@ -374,7 +375,7 @@                       }               logPriority (ideLogger state) Info $ T.pack $ "Parsing module: " <> t               parsed <--                evalGhcEnv session (parseModule ms')+                evalGhcEnv session (GHC.parseModule ms')                   `catch` \e -> throwIO (GHCParseError nt (show @SomeException e))               (fixities, parsed) <- fixFixities f (fixAnns parsed)               return (fixities, parsed)@@ -473,7 +474,7 @@ asTextEdits (Change reps _imports) =   [ (filePathToUri spanLoc, edit)     | Replacement {..} <- nubOrdOn (realSpan . replLocation) reps,-      (OldRealSrcSpan rspan) <- [replLocation],+      (RealSrcSpan rspan _) <- [replLocation],       let spanLoc = unpackFS $ srcSpanFile rspan,       let edit = TextEdit (realSrcSpanToRange rspan) (T.pack replReplacement)   ]