haskell - 警告 : newtype `CInt' is used in an FFI declaration,

标签 haskell ffi

使用 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

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

消除此警告的正确方法是什么?

最佳答案

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

获取构造函数。

关于haskell - 警告 : newtype `CInt' is used in an FFI declaration,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11112287/

相关文章:

haskell - 如何在 Haskell 的多播连接中指定源地址?

在 Swift 中创建一个字符串缓冲区供 C 稍后使用和释放

c - C(不是 C++)的有限域(Galois 域)线性代数库

mongodb - Haskell mongodb 文本搜索

Haskell:runST 出现 "Could not deduce"错误

haskell - 为什么在没有括号的情况下不可能在haskell中乘以负数

python - 将字符串列表从 Python 传递给 Rust

android - 为 Android 构建 libflutter_rust_bridge_example 时出现 Flutter 错误 : Failed to load dynamic library 'libflutter_rust_bridge_example.so'

haskell - 通过 c2hsc 和 hsc2hs 连接 Haskell 中的 C 联合

haskell - 如何仅使用分布式属性编写可表示实例?