Show -Wtabs warnings even when errors are found
The following code
main :: IO ()
main = do
putStrLn "hello"
putStrLn "world" // tab character at beginning of line
looks correct in my editor, because it displays tabs as 4 spaces.
However, it results in the error
• Couldn't match expected type ‘(String -> IO ())
-> [Char] -> IO ()’
with actual type ‘IO ()’
If I fix the file, it compiles, but I get the warning
Tab character found here.
Please use spaces instead.
It would be nice if this warning were displayed in the first case as well, even though compilation has also produced an error, since the warning points to the cause of the error.
I imagine that this could avoid some confusion for beginners, every once in a while.