[GHC] #14125: Bogus unacceptable type in foreign declaration.

GHC ghc-devs at haskell.org
Thu Aug 17 12:48:09 UTC 2017


#14125: Bogus unacceptable type in foreign declaration.
-------------------------------------+-------------------------------------
        Reporter:  winter            |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:  8.2.2
       Component:  Compiler (FFI)    |              Version:  8.2.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3865
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Indeed, I already have a test case for `IOErrno UnixReturn` in the Diff
 posted earlier (whether it's an argument type or result type isn't of much
 consequence, as they're normalized the same).

 To be clear, I was inquiring about this code from your original post.

 {{{#!hs
 foreign import CALLCONV unsafe "HsNet.h recv"
     c_recv :: CInt -> Ptr Word8 -> CSize -> CInt -> IO (UnixReturn CSsize)
 }}}

 I am unable to get this code to emit a `Unacceptable result type in
 foreign declaration` warning on GHC 8.2 like you claimed.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14125#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list