File tree 1 file changed +13
-3
lines changed
ghcide/src/Development/IDE/Spans
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -261,10 +261,20 @@ atPoint IdeOptions{} (HAR _ (hf :: HieASTs a) rf _ (kind :: HieKind hietype)) (D
261
261
info :: NodeInfo hietype
262
262
info = nodeInfoH kind ast
263
263
264
- -- We want evidence variables to be displayed last.
265
- -- Evidence trees contain information of secondary relevance.
264
+ -- We consider identifiers to be internal, if they are evidence bindings.
265
+ isInternal :: (Identifier , IdentifierDetails a ) -> Bool
266
+ isInternal (Right _, dets) =
267
+ any isEvidenceBind $ identInfo dets
268
+ isInternal (Left _, _) = False
269
+
270
+ -- Don't display names we consider internal. They don't render correctly.
266
271
names :: [(Identifier , IdentifierDetails hietype )]
267
- names = sortOn (any isEvidenceUse . identInfo . snd ) $ M. assocs $ nodeIdentifiers info
272
+ names = filter (not . isInternal) unfilteredNames
273
+
274
+ -- We want evidence use variables to be displayed last.
275
+ -- Evidence trees contain information of secondary relevance.
276
+ unfilteredNames :: [(Identifier , IdentifierDetails hietype )]
277
+ unfilteredNames = sortOn (any isEvidenceUse . identInfo . snd ) $ M. assocs $ nodeIdentifiers info
268
278
269
279
prettyName :: (Either ModuleName Name , IdentifierDetails hietype ) -> IO T. Text
270
280
prettyName (Right n, dets)
You can’t perform that action at this time.
0 commit comments