[GHC] #9079: Foreign.C.Types in haskell2010
GHC
ghc-devs at haskell.org
Mon May 5 20:05:54 UTC 2014
#9079: Foreign.C.Types in haskell2010
-----------------------------------------+---------------------------------
Reporter: tensor5 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/haskell2010 | Version: 7.8.2
Keywords: | Operating System:
Architecture: Unknown/Multiple | Unknown/Multiple
Difficulty: Unknown | Type of failure: None/Unknown
Blocked By: | Test Case:
Related Tickets: | Blocking:
-----------------------------------------+---------------------------------
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
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9079>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list