[GHC] #11032: Missing result type handling for State# s in foreign import prim.
GHC
ghc-devs at haskell.org
Fri Oct 30 17:03:34 UTC 2015
#11032: Missing result type handling for State# s in foreign import prim.
-------------------------------------+-------------------------------------
Reporter: ekmett | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (FFI) | Version: 7.10.2
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):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I see in `TcType` this comment:
{{{
Note [Marshalling VoidRep]
~~~~~~~~~~~~~~~~~~~~~~~~~~
We don't treat State# (whose PrimRep is VoidRep) as marshalable.
In turn that means you can't write
foreign import foo :: Int -> State# RealWorld
Reason: the back end falls over with panic "primRepHint:VoidRep";
and there is no compelling reason to permit it
}}}
I don't think there is any fundamental reason not to allow this. Would
someone like to free it up? It'd mean looking at that `ptrRepHint` stuff.
Thanks!
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11032#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list