@@ -1157,7 +1157,7 @@ extendImportTests = testGroup "extend import actions"
1157
1157
, " x :: (:~:) [] []"
1158
1158
, " x = Refl"
1159
1159
])
1160
- (Range (Position 3 17 ) (Position 3 18 ))
1160
+ (Range (Position 3 4 ) (Position 3 8 ))
1161
1161
[ " Add (:~:)(..) to the import list of Data.Type.Equality"
1162
1162
, " Add type (:~:)(Refl) to the import list of Data.Type.Equality" ]
1163
1163
(T. unlines
@@ -1221,7 +1221,7 @@ extendImportTests = testGroup "extend import actions"
1221
1221
, " import ModuleA as A (stuffB)"
1222
1222
, " main = print (stuffB .* stuffB)"
1223
1223
])
1224
- (Range (Position 2 17 ) (Position 2 18 ))
1224
+ (Range (Position 2 22 ) (Position 2 24 ))
1225
1225
[" Add (.*) to the import list of ModuleA" ]
1226
1226
(T. unlines
1227
1227
[ " module ModuleB where"
@@ -1235,7 +1235,7 @@ extendImportTests = testGroup "extend import actions"
1235
1235
, " import Data.List.NonEmpty (fromList)"
1236
1236
, " main = case (fromList []) of _ :| _ -> pure ()"
1237
1237
])
1238
- (Range (Position 2 5 ) (Position 2 6 ))
1238
+ (Range (Position 2 31 ) (Position 2 33 ))
1239
1239
[ " Add NonEmpty((:|)) to the import list of Data.List.NonEmpty"
1240
1240
, " Add NonEmpty(..) to the import list of Data.List.NonEmpty"
1241
1241
]
@@ -1252,7 +1252,7 @@ extendImportTests = testGroup "extend import actions"
1252
1252
, " import Data.Maybe (catMaybes)"
1253
1253
, " x = Just 10"
1254
1254
])
1255
- (Range (Position 3 5 ) (Position 2 6 ))
1255
+ (Range (Position 3 4 ) (Position 3 8 ))
1256
1256
[ " Add Maybe(Just) to the import list of Data.Maybe"
1257
1257
, " Add Maybe(..) to the import list of Data.Maybe"
1258
1258
]
@@ -1484,7 +1484,7 @@ extendImportTests = testGroup "extend import actions"
1484
1484
, " import ModuleA ()"
1485
1485
, " foo = bar"
1486
1486
])
1487
- (Range (Position 3 17 ) (Position 3 18 ))
1487
+ (Range (Position 3 6 ) (Position 3 9 ))
1488
1488
[" Add bar to the import list of ModuleA" ,
1489
1489
" Add bar to the import list of ModuleB" ]
1490
1490
(T. unlines
@@ -1501,7 +1501,7 @@ extendImportTests = testGroup "extend import actions"
1501
1501
, " x :: (:~:) [] []"
1502
1502
, " x = Refl"
1503
1503
])
1504
- (Range (Position 3 17 ) (Position 3 18 ))
1504
+ (Range (Position 3 4 ) (Position 3 8 ))
1505
1505
[ " Add type (:~:)(Refl) to the import list of Data.Type.Equality"
1506
1506
, " Add (:~:)(..) to the import list of Data.Type.Equality" ]
1507
1507
(T. unlines
@@ -2425,7 +2425,7 @@ insertNewDefinitionTests = testGroup "insert new definition actions"
2425
2425
docB <- createDoc " ModuleB.hs" " haskell" (T. unlines start)
2426
2426
_ <- waitForDiagnostics
2427
2427
action <- pickActionWithTitle " Define select :: Int -> Bool"
2428
- =<< getCodeActions docB (R 1 0 0 50 )
2428
+ =<< getCodeActions docB (R 1 8 1 14 )
2429
2429
executeCodeAction action
2430
2430
contentAfterAction <- documentContents docB
2431
2431
liftIO $ contentAfterAction @?= T. unlines expected
@@ -2449,7 +2449,7 @@ insertNewDefinitionTests = testGroup "insert new definition actions"
2449
2449
docB <- createDoc " ModuleB.hs" " haskell" (T. unlines start)
2450
2450
_ <- waitForDiagnostics
2451
2451
action <- pickActionWithTitle " Define select :: Int -> Bool"
2452
- =<< getCodeActions docB (R 1 0 0 50 )
2452
+ =<< getCodeActions docB (R 1 8 1 14 )
2453
2453
executeCodeAction action
2454
2454
contentAfterAction <- documentContents docB
2455
2455
liftIO $ contentAfterAction @?= T. unlines expected
@@ -2750,7 +2750,7 @@ fixConstructorImportTests = testGroup "fix import actions"
2750
2750
[ " module ModuleB where"
2751
2751
, " import ModuleA(Constructor)"
2752
2752
])
2753
- (Range (Position 1 10 ) (Position 1 11 ))
2753
+ (Range (Position 1 15 ) (Position 1 26 ))
2754
2754
" Fix import of A(Constructor)"
2755
2755
(T. unlines
2756
2756
[ " module ModuleB where"
0 commit comments