Skip to content

Commit af7d249

Browse files
committed
make ghcide tests compile
1 parent 4dfb928 commit af7d249

File tree

3 files changed

+161
-136
lines changed

3 files changed

+161
-136
lines changed

ghcide/bench/lib/Experiments.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ experiments =
8585
forM_ docs $ \DocumentPositions{..} ->
8686
changeDoc doc [charEdit stringLiteralP]
8787
flip allWithIdentifierPos docs $ \DocumentPositions{..} ->
88-
not . null <$> getDefinitions doc (fromJust identifierP),
88+
either (not . null) (not . null) . toEither <$> getDefinitions doc (fromJust identifierP),
8989
---------------------------------------------------------------------------------------
9090
bench "documentSymbols" $ allM $ \DocumentPositions{..} -> do
9191
fmap (either (not . null) (not . null)) . getDocumentSymbols $ doc,
@@ -359,7 +359,7 @@ waitForProgressDone :: Session ()
359359
waitForProgressDone = loop
360360
where
361361
loop = do
362-
void $ skipManyTill anyMessage $ satisfyMaybe $ \case
362+
~() <- skipManyTill anyMessage $ satisfyMaybe $ \case
363363
FromServerMess SProgress (NotificationMessage _ _ (ProgressParams _ (End _))) -> Just ()
364364
_ -> Nothing
365365
done <- null <$> getIncompleteProgressSessions
@@ -563,7 +563,7 @@ searchSymbol doc@TextDocumentIdentifier{_uri} fileContents pos = do
563563
checkDefinitions pos = do
564564
defs <- getDefinitions doc pos
565565
case defs of
566-
[Location uri _] -> return $ uri /= _uri
566+
(InL [Location uri _]) -> return $ uri /= _uri
567567
_ -> return False
568568
checkCompletions pos =
569569
not . null <$> getCompletions doc pos

0 commit comments

Comments
 (0)