Skip to content

Commit 92d5a99

Browse files
committed
Switched to using isEvidenceContext to filter out evidence bindings.
1 parent 8ca04ab commit 92d5a99

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ghcide/src/Development/IDE/Spans/AtPoint.hs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import Development.IDE.Core.PositionMapping
3434
import Development.IDE.Core.RuleTypes
3535
import Development.IDE.GHC.Compat
3636
import qualified Development.IDE.GHC.Compat.Util as Util
37-
import Development.IDE.GHC.CoreFile (occNamePrefixes)
3837
import Development.IDE.GHC.Util (printOutputable)
3938
import Development.IDE.Spans.Common
4039
import Development.IDE.Types.Options
@@ -230,9 +229,8 @@ atPoint IdeOptions{} (HAR _ hf _ _ kind) (DKMap dm km) env pos = listToMaybe $ p
230229
names = M.assocs $ nodeIdentifiers info
231230
-- Check if a name matches a pattern for a generated Core variable.
232231
isInternal :: (Identifier, IdentifierDetails a) -> Bool
233-
isInternal (Right n, _) =
234-
let name = printOutputable n
235-
in any (`T.isPrefixOf` name) occNamePrefixes
232+
isInternal (Right _, dets) =
233+
any isEvidenceContext $ identInfo dets
236234
isInternal (Left _, _) = False
237235
filteredNames = filter (not . isInternal) names
238236
types = nodeType info

0 commit comments

Comments
 (0)