Closed
Description
Bug imported from C2HS Trac
Trac ticket created: 2010-05-27T17:26:12-0700
This is a FIXME in the source code, and I'm working on bindings that would really benefit from the DRY aspect of this feature.
Specifically, c2hs should derive the following in/out marshallers:
fromIntegral . fromEnum
andtoEnum . fromIntegral
from an enum hookid
andid
from both naked andnewtype
pointer hookswithForeignPtr
andnewForeignPtr_
forforeign
pointer hookswithPointerType
(the generated function) andPointerType . newForeignPtr_
forforeign newtype
pointer hooks. The out marshaller is not great here, a !ForeignPtr with no finalizers is not terribly useful concealed inside the newtype. Perhapsforeign newtype
should be left naked, or furnished with an 'in' default marshaller only.
Since I don't enjoy giving work to other people, I volunteer to add this functionality and submit a patch. This ticket is created for tracking purposes.