Skip to content

Commit 6c5b835

Browse files
committed
Maybe this will elucidate the error
1 parent d35de94 commit 6c5b835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: hls-test-utils/src/Test/Hls/Util.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ fromCommand _ = error "Not a command"
317317
onMatch :: [a] -> (a -> Bool) -> String -> IO a
318318
onMatch as predicate err = maybe (fail err) return (find predicate as)
319319

320-
noMatch :: [a] -> (a -> Bool) -> String -> IO ()
320+
noMatch :: Show a => [a] -> (a -> Bool) -> String -> IO ()
321321
noMatch [] _ _ = pure ()
322-
noMatch as predicate err = bool (pure ()) (fail err) (any predicate as)
322+
noMatch as predicate err = bool (pure ()) (fail $ (show as) <> err) (any predicate as)
323323

324324
inspectDiagnostic :: [Diagnostic] -> [T.Text] -> IO Diagnostic
325325
inspectDiagnostic diags s = onMatch diags (\ca -> all (`T.isInfixOf` (ca ^. L.message)) s) err

0 commit comments

Comments
 (0)