Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can ghc treat certain specified warnings as errors and others as warnings?

Tags:

haskell

ghc

Can ghc somehow be convinced to treat certain types of warnings as errors and others as warnings, while still reporting them?

I hoped, this would be possible with something like this:

ghc -Werror -fwarn-missing-methods -Wwarn -fwarn-missing-signatures

, but I had no luck with that. (I think gcc doesn't support this either.)

like image 978
shahn Avatar asked May 09 '11 11:05

shahn


1 Answers

Note that starting GHC 8.2.1, this feature exists! It was described by Trac ticket #11219 and now you can do ghc -Werror=missing-methods -Wmissing-signatures!

like image 122
Alex R Avatar answered Nov 07 '22 04:11

Alex R