Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top