Skip to content

Commit c3224d7

Browse files
committed
Add signature help test: LinearTypes
1 parent fe2d618 commit c3224d7

File tree

1 file changed

+15
-0
lines changed
  • plugins/hls-signature-help-plugin/test

1 file changed

+15
-0
lines changed

plugins/hls-signature-help-plugin/test/Main.hs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,21 @@ main =
260260
|]
261261
[ Nothing,
262262
Just $ SignatureHelp [SignatureInformation "f :: forall a. a -> forall a1. a1 -> a1" Nothing (Just [ParameterInformation (InR (15,16)) Nothing, ParameterInformation (InR (31,33)) Nothing]) (Just (InL 0)), SignatureInformation "f :: Integer -> forall a. a -> a" Nothing (Just [ParameterInformation (InR (5,12)) Nothing, ParameterInformation (InR (26,27)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0))
263+
],
264+
mkTest
265+
"LinearTypes"
266+
[trimming|
267+
{-# LANGUAGE LinearTypes #-}
268+
f :: (a -> b) %1 -> a -> b
269+
f = _
270+
x1 = f negate
271+
^ ^
272+
x2 = f _ 1
273+
^
274+
|]
275+
[ Nothing,
276+
Just $ SignatureHelp [SignatureInformation "f :: forall a b. (a -> b) %1 -> a -> b" Nothing (Just [ParameterInformation (InR (18,24)) Nothing, ParameterInformation (InR (32,33)) Nothing]) (Just (InL 0)), SignatureInformation "f :: (Integer -> Integer) %1 -> Integer -> Integer" Nothing (Just [ParameterInformation (InR (6,24)) Nothing, ParameterInformation (InR (32,39)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0)),
277+
Just $ SignatureHelp [SignatureInformation "f :: forall a b. (a -> b) %1 -> a -> b" Nothing (Just [ParameterInformation (InR (18,24)) Nothing, ParameterInformation (InR (32,33)) Nothing]) (Just (InL 0)), SignatureInformation "f :: (Integer -> b) %1 -> Integer -> b" Nothing (Just [ParameterInformation (InR (6,18)) Nothing, ParameterInformation (InR (26,33)) Nothing]) (Just (InL 0))] (Just 0) (Just (InL 0))
263278
]
264279
]
265280

0 commit comments

Comments
 (0)