packages feed

hls-splice-plugin 0.1.0.0 → 0.2.0.0

raw patch · 2 files changed

+5/−22 lines, 2 filesdep −hls-exactprint-utilsdep ~ghcide

Dependencies removed: hls-exactprint-utils

Dependency ranges changed: ghcide

Files

hls-splice-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.2 name:               hls-splice-plugin-version:            0.1.0.0+version:            0.2.0.0 synopsis:           HLS Plugin to expand TemplateHaskell Splices and QuasiQuotes description:        HLS Plugin to expand TemplateHaskell Splices and QuasiQuotes. license:            Apache-2.0@@ -23,8 +23,7 @@                   , hls-plugin-api                   , ghc                   , ghc-exactprint-                  , hls-exactprint-utils-                  , ghcide+                  , ghcide >= 0.7.1                   , lens                   , dlist                   , retrie
src/Ide/Plugin/Splice.hs view
@@ -45,14 +45,13 @@ import GhcPlugins hiding (Var, getLoc, (<>)) import Ide.Plugin.Splice.Types import Ide.PluginUtils (mkLspCommand, responseError)-import Ide.TreeTransform+import Development.IDE.GHC.ExactPrint import Ide.Types-import Language.Haskell.GHC.ExactPrint (TransformT, setPrecedingLines, uniqueSrcSpanT)+import Language.Haskell.GHC.ExactPrint (setPrecedingLines, uniqueSrcSpanT) import Language.Haskell.LSP.Core import Language.Haskell.LSP.Messages import Language.Haskell.LSP.Types import qualified Language.Haskell.LSP.Types.Lens as J-import Retrie.ExactPrint (Annotated) import RnSplice import TcRnMonad import Data.Foldable (Foldable(foldl'))@@ -392,10 +391,7 @@             ParsedModule {..} <-                 MaybeT . runAction "splice.codeAction.GitHieAst" state $                     use GetParsedModule fp-            let spn =-                    rangeToRealSrcSpan ran $-                        fromString $-                            fromNormalizedFilePath fp+            let spn = rangeToRealSrcSpan fp ran                 mouterSplice = something' (detectSplice spn) pm_parsed_source             mcmds <- forM mouterSplice $                 \(spliceSpan, spliceContext) ->@@ -459,15 +455,3 @@             case f x of               Stop -> Nothing               resl -> foldl' (flip (<|>)) (fromSearchResult resl) (gmapQ go x)--posToRealSrcLoc :: Position -> FastString -> RealSrcLoc-posToRealSrcLoc pos fs = mkRealSrcLoc fs (line + 1) (col + 1)-    where-        line = _line pos-        col = _character pos--rangeToRealSrcSpan :: Range -> FastString -> RealSrcSpan-rangeToRealSrcSpan ran fs =-    mkRealSrcSpan-        (posToRealSrcLoc (_start ran) fs)-        (posToRealSrcLoc (_end ran) fs)