File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
hls-plugin-api/src/Ide/Plugin
plugins/hls-explicit-record-fields-plugin/src/Ide/Plugin Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ module Ide.Plugin.RangeMap
13
13
fromList ,
14
14
fromList' ,
15
15
filterByRange ,
16
- flippedFilterByRange ,
16
+ elementsInRange ,
17
17
) where
18
18
19
19
import Development.IDE.Graph.Classes (NFData )
@@ -68,12 +68,12 @@ filterByRange range = map snd . IM.dominators (rangeToInterval range) . unRangeM
68
68
filterByRange range = map snd . filter (isSubrangeOf range . fst ) . unRangeMap
69
69
#endif
70
70
71
- -- | Flipped filter a 'RangeMap' by a given 'Range'.
72
- flippedFilterByRange :: Range -> RangeMap a -> [a ]
71
+ -- | Extracts all elements from a 'RangeMap' that fall within a given 'Range'.
72
+ elementsInRange :: Range -> RangeMap a -> [a ]
73
73
#ifdef USE_FINGERTREE
74
- flippedFilterByRange range = map snd . IM. intersections (rangeToInterval range) . unRangeMap
74
+ elementsInRange range = map snd . IM. intersections (rangeToInterval range) . unRangeMap
75
75
#else
76
- flippedFilterByRange range = map snd . filter (flip isSubrangeOf range . fst ) . unRangeMap
76
+ elementsInRange range = map snd . filter (flip isSubrangeOf range . fst ) . unRangeMap
77
77
#endif
78
78
79
79
#ifdef USE_FINGERTREE
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ inlayHintProvider _ state pId InlayHintParams {_textDocument = TextDocumentIdent
183
183
let -- Get all records with dotdot in current nfp
184
184
records = [ record
185
185
| Just range <- [toCurrentRange pm visibleRange]
186
- , uid <- RangeMap. flippedFilterByRange range crCodeActions
186
+ , uid <- RangeMap. elementsInRange range crCodeActions
187
187
, Just record <- [IntMap. lookup uid crCodeActionResolve] ]
188
188
-- Get the definition of each dotdot of record
189
189
locations = [ getDefinition nfp pos
You can’t perform that action at this time.
0 commit comments