@@ -306,7 +306,7 @@ fromCommand (CACommand command) = command
306
306
fromCommand _ = error " Not a command"
307
307
308
308
onMatch :: [a ] -> (a -> Bool ) -> String -> IO a
309
- onMatch as pred err = maybe (fail err) return (find pred as)
309
+ onMatch as predicate err = maybe (fail err) return (find predicate as)
310
310
311
311
inspectDiagnostic :: [Diagnostic ] -> [T. Text ] -> IO Diagnostic
312
312
inspectDiagnostic diags s = onMatch diags (\ ca -> all (`T.isInfixOf` (ca ^. L. message)) s) err
@@ -316,18 +316,18 @@ expectDiagnostic :: [Diagnostic] -> [T.Text] -> IO ()
316
316
expectDiagnostic diags s = void $ inspectDiagnostic diags s
317
317
318
318
inspectCodeAction :: [CAResult ] -> [T. Text ] -> IO CodeAction
319
- inspectCodeAction cars s = fromAction <$> onMatch cars pred err
320
- where pred (CACodeAction ca) = all (`T.isInfixOf` (ca ^. L. title)) s
321
- pred _ = False
319
+ inspectCodeAction cars s = fromAction <$> onMatch cars predicate err
320
+ where predicate (CACodeAction ca) = all (`T.isInfixOf` (ca ^. L. title)) s
321
+ predicate _ = False
322
322
err = " expected code action matching '" ++ show s ++ " ' but did not find one"
323
323
324
324
expectCodeAction :: [CAResult ] -> [T. Text ] -> IO ()
325
325
expectCodeAction cars s = void $ inspectCodeAction cars s
326
326
327
327
inspectCommand :: [CAResult ] -> [T. Text ] -> IO Command
328
- inspectCommand cars s = fromCommand <$> onMatch cars pred err
329
- where pred (CACommand command) = all (`T.isInfixOf` (command ^. L. title)) s
330
- pred _ = False
328
+ inspectCommand cars s = fromCommand <$> onMatch cars predicate err
329
+ where predicate (CACommand command) = all (`T.isInfixOf` (command ^. L. title)) s
330
+ predicate _ = False
331
331
err = " expected code action matching '" ++ show s ++ " ' but did not find one"
332
332
333
333
waitForDiagnosticsFrom :: TextDocumentIdentifier -> T. Session [Diagnostic ]
0 commit comments