@@ -292,6 +292,89 @@ test = testGroup "explicit-fields"
292292 , _paddingLeft = Nothing
293293 }
294294 ]
295+ , mkInlayHintsTest " CursorRecords" Nothing 9 $ \ ih -> do
296+ let mkLabelPart' = mkLabelPartOffsetLength " CursorRecords"
297+ a0 <- mkLabelPart' 3 14 " a0"
298+ a1 <- mkLabelPart' 4 14 " a1"
299+ a11 <- mkLabelPart' 4 25 " a11"
300+ a2 <- mkLabelPart' 5 14 " a2"
301+ a3 <- mkLabelPart' 6 14 " a3"
302+ (@?=) ih
303+ [ defInlayHint
304+ { _position = Position 9 52
305+ , _label = InR [ a3 ]
306+ , _textEdits = Just [ mkLineTextEdit " L1 {l2 = L2 {l3 = L3 {l4 = L4 {..}, ..}, ..}, a3}" 9 5 53 ]
307+ , _tooltip = Just $ InL " Expand record wildcard"
308+ , _paddingLeft = Just True
309+ , _paddingRight = Nothing
310+ , _data_ = Nothing
311+ }
312+ , defInlayHint
313+ { _position = Position 9 47
314+ , _label = InR [ a2 ]
315+ , _textEdits = Just [ mkLineTextEdit " L2 {l3 = L3 {l4 = L4 {..}, ..}, a2}" 9 14 48 ]
316+ , _tooltip = Just $ InL " Expand record wildcard"
317+ , _paddingLeft = Just True
318+ , _paddingRight = Nothing
319+ , _data_ = Nothing
320+ }
321+ , defInlayHint
322+ { _position = Position 9 42
323+ , _label = InR [ a1 , InlayHintLabelPart " , " Nothing Nothing Nothing , a11 ]
324+ , _textEdits = Just [ mkLineTextEdit " L3 {l4 = L4 {..}, a1, a11}" 9 23 43 ]
325+ , _tooltip = Just $ InL " Expand record wildcard"
326+ , _paddingLeft = Just True
327+ , _paddingRight = Nothing
328+ , _data_ = Nothing
329+ }
330+ , defInlayHint
331+ { _position = Position 9 37
332+ , _label = InR [ a0 ]
333+ , _textEdits = Just [ mkLineTextEdit " L4 {a0}" 9 31 38 ]
334+ , _tooltip = Just $ InL " Expand record wildcard"
335+ , _paddingLeft = Just True
336+ , _paddingRight = Nothing
337+ , _data_ = Nothing
338+ }
339+ ]
340+ , mkInlayHintsTest " CursorPositional" Nothing 15 $ \ ih -> do
341+ let mkLabelPart' = mkLabelPartOffsetLengthSub1 " CursorPositional"
342+ middle <- mkLabelPart' 2 2 " middle="
343+ inner <- mkLabelPart' 6 2 " inner="
344+ foo <- mkLabelPart' 10 2 " foo="
345+ bar <- mkLabelPart' 11 4 " bar="
346+ (@?=) ih
347+ [ defInlayHint
348+ { _position = Position 15 14
349+ , _label = InR [ middle ]
350+ , _textEdits = Just [ mkLineTextEdit " RecOuter { middle = (RecMiddle (RecInner 'c' 42)) }" 15 5 43 ]
351+ , _tooltip = Just $ InL " Expand positional record"
352+ , _paddingLeft = Nothing
353+ }
354+ , defInlayHint
355+ { _position = Position 15 25
356+ , _label = InR [ inner ]
357+ , _textEdits = Just [ mkLineTextEdit " RecMiddle { inner = (RecInner 'c' 42) }" 15 15 42 ]
358+ , _tooltip = Just $ InL " Expand positional record"
359+ , _paddingLeft = Nothing
360+ }
361+ , defInlayHint
362+ { _position = Position 15 35
363+ , _label = InR [ foo ]
364+ , _textEdits =
365+ Just [ mkLineTextEdit " RecInner { foo = 'c', bar = 42 }" 15 26 41 ]
366+ , _tooltip = Just $ InL " Expand positional record"
367+ , _paddingLeft = Nothing
368+ }
369+ , defInlayHint
370+ { _position = Position 15 39
371+ , _label = InR [ bar ]
372+ , _textEdits =
373+ Just [ mkLineTextEdit " RecInner { foo = 'c', bar = 42 }" 15 26 41 ]
374+ , _tooltip = Just $ InL " Expand positional record"
375+ , _paddingLeft = Nothing
376+ }
377+ ]
295378 ]
296379 ]
297380
0 commit comments