Weverything ignores some OPTIONS_GHC flags
When I enable -Weverything
, some OPTIONS_GHC
pragmas are respected, while others are ignored. For example, with -Weverything
, this file
main = print "hello"
foo :: (Num a, Show a) => a -> IO ()
foo = print . show
generates warnings about:
- missing an export list
- top-level binding [main] with no type sig
- redundant constraint [Num a]
If I add {-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-missing-export-lists -fno-warn-redundant-constraints #-}
to the top of the file and recompile, I expect all warnings to go away. But GHC still reports that main
has no signature.
Note that this problem doesn't occur with -Wall
. With -Wall
, the code snippet warns about the missing signature on main
, but when I add the OPTIONS_GHC
, the warning goes away. Thus this problem appears to be unique to Weverything
.