Skip to content

Commit 8f68b90

Browse files
committed
Show provenance in detail text
1 parent e27c1ed commit 8f68b90

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import Data.List.Extra as List hiding
2020
import qualified Data.Map as Map
2121

2222
import Data.Maybe (fromMaybe, isJust,
23-
isNothing,
2423
listToMaybe,
2524
mapMaybe)
2625
import qualified Data.Text as T
@@ -178,7 +177,12 @@ mkCompl
178177
{_label = label,
179178
_kind = kind,
180179
_tags = Nothing,
181-
_detail = (colon <>) <$> typeText,
180+
_detail =
181+
case (typeText, provenance) of
182+
(Just t,_) -> Just $ colon <> t
183+
(_, ImportedFrom mod) -> Just $ "from " <> mod
184+
(_, DefinedIn mod) -> Just $ "from " <> mod
185+
_ -> Nothing,
182186
_documentation = documentation,
183187
_deprecated = Nothing,
184188
_preselect = Nothing,

0 commit comments

Comments
 (0)