Skip to content

Commit 4f68484

Browse files
committed
fix: update import statements and remove redundant rangesOverlap function
1 parent 5aea80d commit 4f68484

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ghcide/src/Development/IDE/Core/PluginUtils.hs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ import qualified Language.LSP.Protocol.Lens as LSP
6060
import Language.LSP.Protocol.Message (SMethod (..))
6161
import qualified Language.LSP.Protocol.Types as LSP
6262
import qualified StmContainers.Map as STM
63-
import qualified Language.LSP.Protocol.Lens as L
64-
import Ide.Types (FormattingHandler, PluginHandlers, FormattingMethod, PluginMethodHandler, mkPluginHandler, FormattingType (..))
63+
import Ide.Types (FormattingHandler, PluginHandlers, FormattingMethod, PluginMethodHandler, mkPluginHandler, FormattingType (..))
64+
import Ide.PluginUtils (rangesOverlap)
6565

6666
-- ----------------------------------------------------------------------------
6767
-- Action wrappers
@@ -181,11 +181,6 @@ fromCurrentRangeMT :: Monad m => PositionMapping -> LSP.Range -> MaybeT m LSP.Ra
181181
fromCurrentRangeMT mapping = MaybeT . pure . fromCurrentRange mapping
182182

183183

184-
-- todo:9.12 same as Ide.PluginUtils (rangesOverlap), migrate later
185-
-- import Ide.PluginUtils (rangesOverlap)
186-
rangesOverlap :: Range -> Range -> Bool
187-
rangesOverlap r1 r2 =
188-
r1 ^. L.start <= r2 ^. L.end && r2 ^. L.start <= r1 ^. L.end
189184
-- ----------------------------------------------------------------------------
190185
-- Diagnostics
191186
-- ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)