[GHC] #16075: OPTIONS_GHC Ignored
GHC
ghc-devs at haskell.org
Wed Dec 19 21:41:12 UTC 2018
#16075: OPTIONS_GHC Ignored
-------------------------------------+-------------------------------------
Reporter: crockeea | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect
Unknown/Multiple | error/warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
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:
1. missing an export list
2. top-level binding [main] with no type sig
3. 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`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16075>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list