You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and toEnum . fromIntegral from an enum hook
id and id from both naked and newtype pointer hooks
withForeignPtr and newForeignPtr_ for foreign pointer hooks
withPointerType (the generated function) and PointerType . newForeignPtr_ for foreign newtype pointer hooks. The out marshaller is not great here, a !ForeignPtr with no finalizers is not terribly useful concealed inside the newtype. Perhaps foreign 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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: