Skip to content

Commit 427f7f7

Browse files
committed
Use Text.find and isJust instead of Text.elem
Text.elem is too new even for GHC 8.10
1 parent 974d591 commit 427f7f7

File tree

1 file changed

+2
-2
lines changed
  • plugins/hls-pragmas-plugin/src/Ide/Plugin

1 file changed

+2
-2
lines changed

plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Control.Lens hiding (List)
1919
import Control.Monad.IO.Class (MonadIO (liftIO))
2020
import qualified Data.HashMap.Strict as H
2121
import Data.List.Extra (nubOrdOn)
22-
import Data.Maybe (catMaybes)
22+
import Data.Maybe (catMaybes, isJust)
2323
import qualified Data.Text as T
2424
import Development.IDE
2525
import Development.IDE.GHC.Compat
@@ -203,7 +203,7 @@ completion _ide _ complParams = do
203203
, Fuzzy.test word matcher
204204
, (appearWhere == NewLine && line == word)
205205
|| (appearWhere == CanInline && line /= word)
206-
|| (T.elem ' ' matcher && appearWhere == NewLine && Fuzzy.test line matcher)
206+
|| (isJust (T.find (== ' ') matcher) && appearWhere == NewLine && Fuzzy.test line matcher)
207207
]
208208
where
209209
line = T.toLower $ VFS.fullLine pfix

0 commit comments

Comments
 (0)