Skip to content

Commit 710cf3b

Browse files
committed
fixup! Fix bugs in completion help text
1 parent 892a20f commit 710cf3b

File tree

1 file changed

+6
-6
lines changed
  • ghcide/src/Development/IDE/Plugin/Completions

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
639639

640640
uniqueCompl :: CompItem -> CompItem -> Ordering
641641
uniqueCompl x y =
642-
case compare (label x, importedFrom (provenance x), compKind x)
643-
(label y, importedFrom (provenance x), compKind y) of
642+
case compare (label x, importedFrom x, compKind x)
643+
(label y, importedFrom y, compKind y) of
644644
EQ ->
645645
-- preserve completions for duplicate record fields where the only difference is in the type
646646
-- remove redundant completions with less type info
@@ -651,10 +651,10 @@ uniqueCompl x y =
651651
else compare (insertText x) (insertText y)
652652
other -> other
653653
where
654-
importedFrom :: Provenance -> T.Text
655-
importedFrom (ImportedFrom m) = m
656-
importedFrom (DefinedIn m) = m
657-
importedFrom (Local _) = "local"
654+
importedFrom :: CompItem -> T.Text
655+
importedFrom (provenance -> ImportedFrom m) = m
656+
importedFrom (provenance -> DefinedIn m) = m
657+
importedFrom (provenance -> Local _) = "local"
658658

659659
-- ---------------------------------------------------------------------
660660
-- helper functions for infix backticks

0 commit comments

Comments
 (0)