Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable "Module does not export identifier" warning in GHC

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?

like image 915
bennofs Avatar asked May 09 '14 19:05

bennofs


1 Answers

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.

like image 71
bennofs Avatar answered Sep 20 '22 22:09

bennofs