From 4231579cc3f09f201cd4983d46efee998a16c756 Mon Sep 17 00:00:00 2001 From: Colten Webb Date: Sun, 25 Sep 2022 15:53:51 -0400 Subject: [PATCH] fix ghc90 test --- ghcide/src/Development/IDE/Plugin/Completions/Logic.hs | 8 +++++--- test/functional/Completion.hs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs b/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs index cb58422de44..78a921bec4e 100644 --- a/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs +++ b/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs @@ -21,7 +21,8 @@ import Data.List.Extra as List hiding import qualified Data.Map as Map import Data.Maybe (catMaybes, fromMaybe, - isJust, mapMaybe, listToMaybe) + isJust, listToMaybe, + mapMaybe) import qualified Data.Text as T import qualified Text.Fuzzy.Parallel as Fuzzy @@ -637,7 +638,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, -- Completions can return more information that just the completion itself, but it will -- require more than what GHC currently gives us in the HieAST, since it only gives the Type -- of the fields, not where they are defined, etc. So for now the extra fields remain empty. - -- Also: additionalTextEdits is a todo, since we may want to import the record. It requires a way + -- Also: additionalTextEdits is a todo, since we may want to import the record. It requires a way -- to get the record's module, which isn't included in the type information used to get the fields. dotFieldSelectorToCompl :: T.Text -> T.Text -> (Bool, CompItem) dotFieldSelectorToCompl recname label = (True, CI @@ -678,7 +679,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, ty = showForSnippet <$> typ thisModName = Local $ nameSrcSpan name - -- When record-dot-syntax completions are available, we return them exclusively. + -- When record-dot-syntax completions are available, we return them exclusively. -- They are only available when we write i.e. `myrecord.` with OverloadedRecordDot enabled. -- Anything that isn't a field is invalid, so those completion don't make sense. compls @@ -744,6 +745,7 @@ getCompletions plugins ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, + uniqueCompl :: CompItem -> CompItem -> Ordering uniqueCompl candidate unique = case compare (label candidate, compKind candidate) diff --git a/test/functional/Completion.hs b/test/functional/Completion.hs index 1476488a5a7..8516051c51f 100644 --- a/test/functional/Completion.hs +++ b/test/functional/Completion.hs @@ -376,4 +376,4 @@ compls `shouldNotContainCompl` lbl = @? "Should not contain completion: " ++ show lbl expectFailIfBeforeGhc92 :: String -> TestTree -> TestTree -expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC86] +expectFailIfBeforeGhc92 = knownBrokenForGhcVersions [GHC810, GHC88, GHC86, GHC90]