Skip to content

Commit e021ae1

Browse files
committed
fix ghc90 test
1 parent 8ca79b6 commit e021ae1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ghcide/src/Development/IDE/Plugin/Completions/Logic.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import Data.List.Extra as List hiding
2121
import qualified Data.Map as Map
2222

2323
import Data.Maybe (catMaybes, fromMaybe,
24-
isJust, mapMaybe, listToMaybe)
24+
isJust, listToMaybe,
25+
mapMaybe)
2526
import qualified Data.Text as T
2627
import qualified Text.Fuzzy.Parallel as Fuzzy
2728

@@ -637,7 +638,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
637638
-- Completions can return more information that just the completion itself, but it will
638639
-- require more than what GHC currently gives us in the HieAST, since it only gives the Type
639640
-- of the fields, not where they are defined, etc. So for now the extra fields remain empty.
640-
-- Also: additionalTextEdits is a todo, since we may want to import the record. It requires a way
641+
-- Also: additionalTextEdits is a todo, since we may want to import the record. It requires a way
641642
-- to get the record's module, which isn't included in the type information used to get the fields.
642643
dotFieldSelectorToCompl :: T.Text -> T.Text -> (Bool, CompItem)
643644
dotFieldSelectorToCompl recname label = (True, CI
@@ -678,7 +679,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
678679
ty = showForSnippet <$> typ
679680
thisModName = Local $ nameSrcSpan name
680681

681-
-- When record-dot-syntax completions are available, we return them exclusively.
682+
-- When record-dot-syntax completions are available, we return them exclusively.
682683
-- They are only available when we write i.e. `myrecord.` with OverloadedRecordDot enabled.
683684
-- Anything that isn't a field is invalid, so those completion don't make sense.
684685
compls
@@ -744,6 +745,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls,
744745

745746

746747

748+
747749
uniqueCompl :: CompItem -> CompItem -> Ordering
748750
uniqueCompl candidate unique =
749751
case compare (label candidate, compKind candidate)

test/functional/Completion.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,4 +376,4 @@ compls `shouldNotContainCompl` lbl =
376376
@? "Should not contain completion: " ++ show lbl
377377

378378
expectFailIfBeforeGhc92 :: String -> TestTree -> TestTree
379-
expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC86]
379+
expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC86, GHC90]

0 commit comments

Comments
 (0)