We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d35de94 commit 6c5b835Copy full SHA for 6c5b835
hls-test-utils/src/Test/Hls/Util.hs
@@ -317,9 +317,9 @@ fromCommand _ = error "Not a command"
317
onMatch :: [a] -> (a -> Bool) -> String -> IO a
318
onMatch as predicate err = maybe (fail err) return (find predicate as)
319
320
-noMatch :: [a] -> (a -> Bool) -> String -> IO ()
+noMatch :: Show a => [a] -> (a -> Bool) -> String -> IO ()
321
noMatch [] _ _ = pure ()
322
-noMatch as predicate err = bool (pure ()) (fail err) (any predicate as)
+noMatch as predicate err = bool (pure ()) (fail $ (show as) <> err) (any predicate as)
323
324
inspectDiagnostic :: [Diagnostic] -> [T.Text] -> IO Diagnostic
325
inspectDiagnostic diags s = onMatch diags (\ca -> all (`T.isInfixOf` (ca ^. L.message)) s) err
0 commit comments