Bad error message "Invalid type signature"
The following line of code:
foreign export ccall foo :: IO ()
generates this error message:
TestErr.hs:1:0: Invalid type signature
(In this case, the programmer error was of course that the !ForeignFunctionInterface pragma is missing, and the parser has treated this as a definition of the function 'foreign'; this is a motivational example and not directly relevant to the issue)
This error message is quite uninformative - and after looking at the code which generates it, I still can't figure out what kind of error it's supposed to be detecting. It should be changed to explain why the type signature appears to be invalid. Ideally, it would then be immediately apparent that the line has been parsed in an unexpected way.