@@ -16,7 +16,7 @@ spec :: Spec
1616spec = describe " completions" $ do
1717 it " works" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
1818 doc <- openDoc " Completion.hs" " haskell"
19- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
19+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
2020
2121 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " put"
2222 _ <- applyEdit doc te
@@ -38,7 +38,7 @@ spec = describe "completions" $ do
3838
3939 it " completes imports" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
4040 doc <- openDoc " Completion.hs" " haskell"
41- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
41+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
4242
4343 let te = TextEdit (Range (Position 1 17 ) (Position 1 26 )) " Data.M"
4444 _ <- applyEdit doc te
@@ -52,7 +52,7 @@ spec = describe "completions" $ do
5252
5353 it " completes qualified imports" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
5454 doc <- openDoc " Completion.hs" " haskell"
55- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
55+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
5656
5757 let te = TextEdit (Range (Position 2 17 ) (Position 1 25 )) " Dat"
5858 _ <- applyEdit doc te
@@ -66,7 +66,7 @@ spec = describe "completions" $ do
6666
6767 it " completes language extensions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
6868 doc <- openDoc " Completion.hs" " haskell"
69- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
69+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
7070
7171 let te = TextEdit (Range (Position 0 24 ) (Position 0 31 )) " "
7272 _ <- applyEdit doc te
@@ -79,7 +79,7 @@ spec = describe "completions" $ do
7979
8080 it " completes pragmas" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
8181 doc <- openDoc " Completion.hs" " haskell"
82- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
82+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
8383
8484 let te = TextEdit (Range (Position 0 4 ) (Position 0 34 )) " "
8585 _ <- applyEdit doc te
@@ -94,7 +94,7 @@ spec = describe "completions" $ do
9494
9595 it " completes pragmas no close" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
9696 doc <- openDoc " Completion.hs" " haskell"
97- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
97+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
9898
9999 let te = TextEdit (Range (Position 0 4 ) (Position 0 24 )) " "
100100 _ <- applyEdit doc te
@@ -109,7 +109,7 @@ spec = describe "completions" $ do
109109
110110 it " completes options pragma" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
111111 doc <- openDoc " Completion.hs" " haskell"
112- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
112+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
113113
114114 let te = TextEdit (Range (Position 0 4 ) (Position 0 34 )) " OPTIONS"
115115 _ <- applyEdit doc te
@@ -127,7 +127,7 @@ spec = describe "completions" $ do
127127 it " completes ghc options pragma values" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
128128 doc <- openDoc " Completion.hs" " haskell"
129129
130- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
130+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
131131
132132 let te = TextEdit (Range (Position 0 0 ) (Position 0 0 )) " {-# OPTIONS_GHC -Wno-red #-}\n "
133133 _ <- applyEdit doc te
@@ -144,14 +144,14 @@ spec = describe "completions" $ do
144144
145145 it " completes with no prefix" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
146146 doc <- openDoc " Completion.hs" " haskell"
147- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
147+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
148148 compls <- getCompletions doc (Position 5 7 )
149149 liftIO $ filter ((== " !!" ) . (^. label)) compls `shouldNotSatisfy` null
150150
151151 -- See https://github.com/haskell/haskell-ide-engine/issues/903
152152 it " strips compiler generated stuff from completions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
153153 doc <- openDoc " DupRecFields.hs" " haskell"
154- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
154+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
155155
156156 let te = TextEdit (Range (Position 5 0 ) (Position 5 2 )) " acc"
157157 _ <- applyEdit doc te
@@ -167,15 +167,15 @@ spec = describe "completions" $ do
167167 describe " contexts" $ do
168168 it " only provides type suggestions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
169169 doc <- openDoc " Context.hs" " haskell"
170- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
170+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
171171 compls <- getCompletions doc (Position 2 17 )
172172 liftIO $ do
173173 compls `shouldContainCompl` " Integer"
174174 compls `shouldNotContainCompl` " interact"
175175
176176 it " only provides type suggestions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
177177 doc <- openDoc " Context.hs" " haskell"
178- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
178+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
179179 compls <- getCompletions doc (Position 3 9 )
180180 liftIO $ do
181181 compls `shouldContainCompl` " abs"
@@ -184,7 +184,7 @@ spec = describe "completions" $ do
184184 -- This currently fails if it takes too long to typecheck the module
185185 -- it "completes qualified type suggestions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do
186186 -- doc <- openDoc "Context.hs" "haskell"
187- -- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
187+ -- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
188188 -- let te = TextEdit (Range (Position 2 17) (Position 2 17)) " -> Conc."
189189 -- _ <- applyEdit doc te
190190 -- compls <- getCompletions doc (Position 2 26)
@@ -195,7 +195,7 @@ spec = describe "completions" $ do
195195
196196 it " have implicit foralls on basic polymorphic types" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
197197 doc <- openDoc " Completion.hs" " haskell"
198- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
198+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
199199 let te = TextEdit (Range (Position 5 7 ) (Position 5 9 )) " id"
200200 _ <- applyEdit doc te
201201 compls <- getCompletions doc (Position 5 9 )
@@ -207,7 +207,7 @@ spec = describe "completions" $ do
207207
208208 it " have implicit foralls with multiple type variables" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
209209 doc <- openDoc " Completion.hs" " haskell"
210- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
210+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
211211 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " flip"
212212 _ <- applyEdit doc te
213213 compls <- getCompletions doc (Position 5 11 )
@@ -220,7 +220,7 @@ spec = describe "completions" $ do
220220 describe " snippets" $ do
221221 it " work for argumentless constructors" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
222222 doc <- openDoc " Completion.hs" " haskell"
223- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
223+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
224224
225225 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " Nothing"
226226 _ <- applyEdit doc te
@@ -233,7 +233,7 @@ spec = describe "completions" $ do
233233
234234 it " work for polymorphic types" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
235235 doc <- openDoc " Completion.hs" " haskell"
236- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
236+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
237237
238238 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " fold"
239239 _ <- applyEdit doc te
@@ -250,7 +250,7 @@ spec = describe "completions" $ do
250250
251251 it " work for complex types" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
252252 doc <- openDoc " Completion.hs" " haskell"
253- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
253+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
254254
255255 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " mapM"
256256 _ <- applyEdit doc te
@@ -267,7 +267,7 @@ spec = describe "completions" $ do
267267
268268 it " work for infix functions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
269269 doc <- openDoc " Completion.hs" " haskell"
270- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
270+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
271271
272272 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " even `filte"
273273 _ <- applyEdit doc te
@@ -282,7 +282,7 @@ spec = describe "completions" $ do
282282
283283 it " work for infix functions in backticks" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
284284 doc <- openDoc " Completion.hs" " haskell"
285- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
285+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
286286
287287 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " even `filte`"
288288 _ <- applyEdit doc te
@@ -297,7 +297,7 @@ spec = describe "completions" $ do
297297
298298 it " work for qualified infix functions" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
299299 doc <- openDoc " Completion.hs" " haskell"
300- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
300+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
301301
302302 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " \"\" `Data.List.interspe"
303303 _ <- applyEdit doc te
@@ -312,7 +312,7 @@ spec = describe "completions" $ do
312312
313313 it " work for qualified infix functions in backticks" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
314314 doc <- openDoc " Completion.hs" " haskell"
315- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
315+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
316316
317317 let te = TextEdit (Range (Position 5 7 ) (Position 5 24 )) " \"\" `Data.List.interspe`"
318318 _ <- applyEdit doc te
@@ -328,7 +328,7 @@ spec = describe "completions" $ do
328328
329329 it " respects lsp configuration" $ runSession hieCommand fullCaps " test/testdata/completion" $ do
330330 doc <- openDoc " Completion.hs" " haskell"
331- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
331+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
332332
333333 let config = object [" languageServerHaskell" .= (object [" completionSnippetsOn" .= False ])]
334334
@@ -338,7 +338,7 @@ spec = describe "completions" $ do
338338
339339 it " respects client capabilities" $ runSession hieCommand noSnippetsCaps " test/testdata/completion" $ do
340340 doc <- openDoc " Completion.hs" " haskell"
341- _ <- skipManyTill loggingNotification ( count 2 noDiagnostics)
341+ _ <- count 2 $ skipManyTill loggingNotification noDiagnostics
342342
343343 checkNoSnippets doc
344344 where
0 commit comments