@@ -1729,7 +1729,7 @@ suggestImportTests = testGroup "suggest import actions"
1729
1729
-- there isn't a good way to wait until the whole project is checked atm
1730
1730
when waitForCheckProject $ liftIO $ sleep 0.5
1731
1731
let defLine = length imps + 1
1732
- range = Range (Position defLine 0 ) (Position defLine maxBound )
1732
+ range = Range (Position defLine 0 ) (Position defLine maxBoundUinteger )
1733
1733
actions <- getCodeActions doc range
1734
1734
if wanted
1735
1735
then do
@@ -2467,7 +2467,7 @@ fillTypedHoleTests = let
2467
2467
let expectedCode = sourceCode newA newB newC
2468
2468
doc <- createDoc " Testing.hs" " haskell" originalCode
2469
2469
_ <- waitForDiagnostics
2470
- actionsOrCommands <- getCodeActions doc (Range (Position 9 0 ) (Position 9 maxBound ))
2470
+ actionsOrCommands <- getCodeActions doc (Range (Position 9 0 ) (Position 9 maxBoundUinteger ))
2471
2471
chosenAction <- liftIO $ pickActionWithTitle actionTitle actionsOrCommands
2472
2472
executeCodeAction chosenAction
2473
2473
modifiedCode <- documentContents doc
@@ -2508,7 +2508,7 @@ fillTypedHoleTests = let
2508
2508
, " ioToSome = " <> x ]
2509
2509
doc <- createDoc " Test.hs" " haskell" $ mkDoc " _toException"
2510
2510
_ <- waitForDiagnostics
2511
- actions <- getCodeActions doc (Range (Position 3 0 ) (Position 3 maxBound ))
2511
+ actions <- getCodeActions doc (Range (Position 3 0 ) (Position 3 maxBoundUinteger ))
2512
2512
chosen <- liftIO $ pickActionWithTitle " replace _toException with E.toException" actions
2513
2513
executeCodeAction chosen
2514
2514
modifiedCode <- documentContents doc
@@ -3003,7 +3003,7 @@ addSigActionTests = let
3003
3003
let expectedCode = after' def sig
3004
3004
doc <- createDoc " Sigs.hs" " haskell" originalCode
3005
3005
_ <- waitForDiagnostics
3006
- actionsOrCommands <- getCodeActions doc (Range (Position 5 1 ) (Position 5 maxBound ))
3006
+ actionsOrCommands <- getCodeActions doc (Range (Position 5 1 ) (Position 5 maxBoundUinteger ))
3007
3007
chosenAction <- liftIO $ pickActionWithTitle (" add signature: " <> sig) actionsOrCommands
3008
3008
executeCodeAction chosenAction
3009
3009
modifiedCode <- documentContents doc
@@ -4800,7 +4800,7 @@ outlineTests = testGroup
4800
4800
SkFile
4801
4801
Nothing
4802
4802
Nothing
4803
- (R 0 0 maxBound 0 )
4803
+ (R 0 0 maxBoundUinteger 0 )
4804
4804
loc
4805
4805
(Just $ List cc)
4806
4806
classSymbol name loc cc = DocumentSymbol name
@@ -5991,3 +5991,8 @@ listOfChar | ghcVersion >= GHC90 = "String"
5991
5991
thDollarIdx :: Int
5992
5992
thDollarIdx | ghcVersion >= GHC90 = 1
5993
5993
| otherwise = 0
5994
+
5995
+ -- | We don't have a uinteger type yet. So hardcode the maxBound of uinteger, 2 ^ 31 - 1
5996
+ -- as a constant.
5997
+ maxBoundUinteger :: Int
5998
+ maxBoundUinteger = 2147483647
0 commit comments