File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
hls-graph/src/Development/IDE/Graph/Internal
hls-refactor-plugin/src/Development/IDE/Plugin/Plugins
hls-rename-plugin/src/Ide/Plugin Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ import System.IO.Unsafe
3636import System.Time.Extra (Seconds )
3737import UnliftIO (MonadUnliftIO )
3838
39+ #if !MIN_VERSION_base(4,18,0)
40+ import Control.Applicative (liftA2 )
41+ #endif
3942
4043unwrapDynamic :: forall a . Typeable a => Dynamic -> a
4144unwrapDynamic x = fromMaybe (error msg) $ fromDynamic x
Original file line number Diff line number Diff line change 11{-# LANGUAGE CPP #-}
22module Development.IDE.Plugin.Plugins.AddArgument (plugin ) where
33
4- #if MIN_VERSION_ghc(9,4,0)
5- import Development.IDE.GHC.ExactPrint (epl )
6- import GHC.Parser.Annotation (TokenLocation (.. ))
7- #endif
84import Control.Monad (join )
95import Control.Monad.Trans.Class (lift )
106import Data.Bifunctor (Bifunctor (.. ))
@@ -32,12 +28,18 @@ import Language.Haskell.GHC.ExactPrint (TransformT (..),
3228 noAnnSrcSpanDP1 ,
3329 runTransformT )
3430import Language.LSP.Protocol.Types
35- #if !MIN_VERSION_ghc(9,3,0)
31+
32+ #if !MIN_VERSION_ghc(9,4,0)
3633import GHC (TrailingAnn (.. ))
3734import GHC.Hs (IsUnicodeSyntax (.. ))
3835import Language.Haskell.GHC.ExactPrint.Transform (d1 )
3936#endif
4037
38+ #if MIN_VERSION_ghc(9,4,0)
39+ import Development.IDE.GHC.ExactPrint (epl )
40+ import GHC.Parser.Annotation (TokenLocation (.. ))
41+ #endif
42+
4143-- When GHC tells us that a variable is not bound, it will tell us either:
4244-- - there is an unbound variable with a given type
4345-- - there is an unbound variable (GHC provides no type suggestion)
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ module Ide.Plugin.Rename (descriptor, E.Log) where
1010import Compat.HieTypes
1111import Control.Lens ((^.) )
1212import Control.Monad
13- import Control.Monad.Except
13+ import Control.Monad.Except (ExceptT , MonadError ,
14+ throwError )
15+ import Control.Monad.IO.Class (MonadIO , liftIO )
16+ import Control.Monad.Trans.Class (lift )
1417import Data.Bifunctor (first )
1518import Data.Generics
1619import Data.Hashable
You can’t perform that action at this time.
0 commit comments