ben*_*ofs 8 haskell compiler-warnings ghc
编译以下代码:
import Prelude hiding (nonExistent)
main = return ()
Run Code Online (Sandbox Code Playgroud)
随着ghc -Wall
给出:
test.hs:1:1: Warning:
Module `Prelude' does not export `nonExistent'
Run Code Online (Sandbox Code Playgroud)
是否有-fno-XXX
禁用此特定警告的标志?
我自己刚刚找到了国旗-fno-warn-dodgy-imports
:
除了文档中说明的内容:
-fwarn-dodgy-imports:当使用所有构造函数导入数据类型T时发出警告,即T(..),但是已经抽象地导出,即T.
它似乎也启用/禁用我在我的问题中给出的特定警告.