Question

Compiling the following code:

import Prelude hiding (nonExistent)
main = return ()

With ghc -Wall gives:

test.hs:1:1: Warning:
    Module `Prelude' does not export `nonExistent'

Is there a -fno-XXX flag that disables this specific warning?

Était-ce utile?

La solution

I just found the flag myself: -fno-warn-dodgy-imports:

Besides what is stated in the documentation:

-fwarn-dodgy-imports: Causes a warning to be emitted when a datatype T is imported with all constructors, i.e. T(..), but has been exported abstractly, i.e. T.

it also seems to enable/disable the specific warning I gave in my question.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top