[GHC] #736: Allowing any newtype of the IO monad to be used in FFI and extra optional entry point

GHC trac at galois.com
Tue Jul 3 09:01:47 EDT 2007


#736: Allowing any newtype of the IO monad to be used in FFI and extra optional
entry point
----------------------------------------------+-----------------------------
    Reporter:  brianh at metamilk.com            |        Owner:            
        Type:  feature request                |       Status:  new       
    Priority:  normal                         |    Milestone:  6.8       
   Component:  Compiler                       |      Version:  6.4.1     
    Severity:  normal                         |   Resolution:            
    Keywords:  FFI foreign monad entry point  |   Difficulty:  Unknown   
          Os:  Multiple                       |     Testcase:  ffi-deriv1
Architecture:  Multiple                       |  
----------------------------------------------+-----------------------------
Changes (by simonmar):

  * testcase:  => ffi-deriv1

Comment:

 This is allegedly done:

 {{{
 Tue Apr 11 13:04:41 BST 2006  simonpj at microsoft.com
   * Allow IO to be wrapped in a newtype in foreign import/export
 }}}

 and we have a test:

 {{{
 Wed Apr 26 19:36:36 BST 2006  simonpj at microsoft.com
   * Add test for newtypes in FFI
 }}}

 But the test is currently failing, alas.

 {{{
 ffi-deriv1.hs:14:0:
     Unacceptable result type in foreign declaration: RenderM ()
     When checking declaration:
         foreign import ccall safe "static  &duma_onRender" duma_onRender
 :: FunPtr RenderCallback
 -> RenderM ()

 ffi-deriv1.hs:16:0:
     Unacceptable result type in foreign declaration: RenderM ()
     When checking declaration:
         foreign import ccall safe "wrapper" mkRenderCallback ::
 RenderCallback
                                                                 -> RenderM
 (FunPtr RenderCallback)

 ffi-deriv1.hs:16:0:
     Unacceptable result type in foreign declaration:
         RenderM (FunPtr RenderCallback)
     When checking declaration:
         foreign import ccall safe "wrapper" mkRenderCallback ::
 RenderCallback
                                                                 -> RenderM
 (FunPtr RenderCallback)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/736>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list