@@ -306,7 +306,7 @@ fromCommand (CACommand command) = command
306306fromCommand _ = error " Not a command"
307307
308308onMatch :: [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)
310310
311311inspectDiagnostic :: [Diagnostic ] -> [T. Text ] -> IO Diagnostic
312312inspectDiagnostic diags s = onMatch diags (\ ca -> all (`T.isInfixOf` (ca ^. L. message)) s) err
@@ -316,18 +316,18 @@ expectDiagnostic :: [Diagnostic] -> [T.Text] -> IO ()
316316expectDiagnostic diags s = void $ inspectDiagnostic diags s
317317
318318inspectCodeAction :: [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
322322 err = " expected code action matching '" ++ show s ++ " ' but did not find one"
323323
324324expectCodeAction :: [CAResult ] -> [T. Text ] -> IO ()
325325expectCodeAction cars s = void $ inspectCodeAction cars s
326326
327327inspectCommand :: [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
331331 err = " expected code action matching '" ++ show s ++ " ' but did not find one"
332332
333333waitForDiagnosticsFrom :: TextDocumentIdentifier -> T. Session [Diagnostic ]
0 commit comments