From 6c5b8356a37de4f6b65da2c90fbde41a126c7ff6 Mon Sep 17 00:00:00 2001 From: Sandy Maguire Date: Thu, 22 Jul 2021 22:45:09 -0700 Subject: [PATCH] Maybe this will elucidate the error --- hls-test-utils/src/Test/Hls/Util.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hls-test-utils/src/Test/Hls/Util.hs b/hls-test-utils/src/Test/Hls/Util.hs index 05e06b7d64..dd97cc242c 100644 --- a/hls-test-utils/src/Test/Hls/Util.hs +++ b/hls-test-utils/src/Test/Hls/Util.hs @@ -317,9 +317,9 @@ fromCommand _ = error "Not a command" onMatch :: [a] -> (a -> Bool) -> String -> IO a onMatch as predicate err = maybe (fail err) return (find predicate as) -noMatch :: [a] -> (a -> Bool) -> String -> IO () +noMatch :: Show a => [a] -> (a -> Bool) -> String -> IO () noMatch [] _ _ = pure () -noMatch as predicate err = bool (pure ()) (fail err) (any predicate as) +noMatch as predicate err = bool (pure ()) (fail $ (show as) <> err) (any predicate as) inspectDiagnostic :: [Diagnostic] -> [T.Text] -> IO Diagnostic inspectDiagnostic diags s = onMatch diags (\ca -> all (`T.isInfixOf` (ca ^. L.message)) s) err