Re: [GHC] #7243: regression: acceptable foreign result types
#7243: regression: acceptable foreign result types ---+ Reporter: dmwit | Owner: igloo Type: bug | Status: new Priority: normal | Milestone: 7.6.2 Component: Compiler (FFI) | Version: 7.6.1 Keywords: | Os: Unknown/Multiple Architecture: x86_64 (amd64) | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | ---+ Comment(by simonpj): See also #5610. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7243#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7243: regression: acceptable foreign result types
#7243: regression: acceptable foreign result types ---+ Reporter: dmwit | Owner: Type: bug| Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: x86_64 (amd64) Failure: GHC rejects valid program | Testcase: Blockedby: | Blocking: Related: | ---+ Changes (by romildo): * cc: malaquias@… (added) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7243#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7243: regression: acceptable foreign result types
#7243: regression: acceptable foreign result types ---+ Reporter: dmwit | Owner: igloo Type: bug | Status: new Priority: normal | Milestone: 7.6.2 Component: Compiler (FFI) | Version: 7.6.1 Keywords: | Os: Unknown/Multiple Architecture: x86_64 (amd64) | Failure: GHC rejects valid program Difficulty: Unknown |Testcase: Blockedby: |Blocking: Related: | ---+ Changes (by igloo): * owner: = igloo * difficulty: = Unknown * component: Compiler = Compiler (FFI) * milestone: = 7.6.2 Comment: The problem is: {{{ Dynamic wrapper. The type of a wrapper stub has to be of the form ft - IO (FunPtr ft), where ft may be any foreign type. }}} e.g. this is accepted: {{{ import Foreign.Ptr foreign import ccall wrapper foo :: () - IO (FunPtr ()) }}} I'll leave the ticket open, though, as I think we should give the expected pattern in the error message. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7243#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #7243: regression: acceptable foreign result types
#7243: regression: acceptable foreign result types ---+ Reporter: dmwit | Owner: Type: bug| Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: x86_64 (amd64) Failure: GHC rejects valid program | Testcase: Blockedby: | Blocking: Related: | ---+ The following short file is rejected: {{{ import Foreign.Ptr foreign import ccall wrapper foo :: IO (FunPtr ()) }}} The error is: {{{ test.hs:2:1: Unacceptable type in foreign declaration: IO (FunPtr ()) When checking declaration: foreign import ccall safe wrapper foo :: IO (FunPtr ()) }}} However, my reading of the 2010 Report suggests this should be acceptable. Specifically: * Prelude.IO t is a marshallable foreign result type when t is a marshallable foreign type,[[BR]] * all basic foreign types are marshallable foreign types, and[[BR]] * FunPtr a is a basic foreign type for all a. (Political note: I include this chain of reasoning not because I think others too stupid to recreate it, but because I think it likely that I am not reading the Report correctly, and want to make it easy to detect and correct any misconceptions I have.) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7243 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #7243: regression: acceptable foreign result types
#7243: regression: acceptable foreign result types ---+ Reporter: dmwit | Owner: Type: bug| Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: x86_64 (amd64) Failure: GHC rejects valid program | Testcase: Blockedby: | Blocking: Related: | ---+ Changes (by td123): * cc: gostrc@… (added) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7243#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs