Skip to content

Commit

Permalink
Fix splice plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Dec 22, 2022
1 parent ddf34a5 commit 578bc3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ annotate dflags needs_space ast = do
let rendered = render dflags ast
#if MIN_VERSION_ghc(9,4,0)
expr' <- lift $ mapLeft (showSDoc dflags . ppr) $ parseAST dflags uniq rendered
pure expr'
pure $ setPrecedingLines expr' 0 (bool 0 1 needs_space)
#elif MIN_VERSION_ghc(9,2,0)
expr' <- lift $ mapLeft show $ parseAST dflags uniq rendered
pure $ setPrecedingLines expr' 0 (bool 0 1 needs_space)
Expand Down
10 changes: 5 additions & 5 deletions plugins/hls-refactor-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1669,9 +1669,9 @@ suggestImportTests = testGroup "suggest import actions"
, test True [] "f = empty" [] "import Control.Applicative (empty)"
, test True [] "f = empty" [] "import Control.Applicative"
, test True [] "f = (&)" [] "import Data.Function ((&))"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name: https://gitlab.haskell.org/ghc/ghc/-/issues/20472"
$ test True [] "f = NE.nonEmpty" [] "import qualified Data.List.NonEmpty as NE"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name: https://gitlab.haskell.org/ghc/ghc/-/issues/20472"
$ test True [] "f = Data.List.NonEmpty.nonEmpty" [] "import qualified Data.List.NonEmpty"
, test True [] "f :: Typeable a => a" ["f = undefined"] "import Data.Typeable (Typeable)"
, test True [] "f = pack" [] "import Data.Text (pack)"
Expand All @@ -1681,16 +1681,16 @@ suggestImportTests = testGroup "suggest import actions"
, test True [] "f = (.|.)" [] "import Data.Bits (Bits((.|.)))"
, test True [] "f = (.|.)" [] "import Data.Bits ((.|.))"
, test True [] "f :: a ~~ b" [] "import Data.Type.Equality ((~~))"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name: https://gitlab.haskell.org/ghc/ghc/-/issues/20472"
$ test True
["qualified Data.Text as T"
] "f = T.putStrLn" [] "import qualified Data.Text.IO as T"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name: https://gitlab.haskell.org/ghc/ghc/-/issues/20472"
$ test True
[ "qualified Data.Text as T"
, "qualified Data.Function as T"
] "f = T.putStrLn" [] "import qualified Data.Text.IO as T"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name"
, ignoreForGHC94 "On GHC 9.4 the error message doesn't contain the qualified module name: https://gitlab.haskell.org/ghc/ghc/-/issues/20472"
$ test True
[ "qualified Data.Text as T"
, "qualified Data.Function as T"
Expand Down

0 comments on commit 578bc3f

Please sign in to comment.