Foreign.C.Types in haskell2010
According to Haskell 2010, a marshallable foreign type has to be a newtype of a basic type with exposed constructor. Why constructors are not exposed in the module Foreign.C.Types from haskell2010?
When I replace base with haskell2010 in
module Test where
import Foreign.C
foreign import ccall unsafe "sys/mount.h umount" umount :: CString -> IO CInt
I get
Unacceptable result type in foreign declaration: IO CInt
When checking declaration:
foreign import ccall unsafe "static sys/mount.h umount" umount
:: CString -> IO CInt
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/haskell2010 |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |