4

使用 ghc 7.4.2 构建 gtk2hs-buildtools 时,我收到以下警告:

c2hs/toplevel/C2HSConfig.hs:110:1:
    Warning: newtype `CInt' is used in an FFI declaration,
             but its constructor is not in scope.
             This will become an error in GHC 7.6.1.
    When checking declaration:
      foreign import ccall safe "static bitfield_direction" bitfield_direction
        :: CInt

即使我有 FFI 调用,我也会收到类似的警告import Foreign.C.Types(CInt)

摆脱此警告的正确方法是什么?

4

1 回答 1

5
import Foreign.C.Types(CInt(..))

获取构造函数。

于 2012-06-20T03:11:10.897 回答