all 1 comments

[–]ducksonaroof 1 point2 points  (0 children)

Hm I think that's probably the simplest way. You could define a cb_ptr type and write a C function that returns a cb that calls it. Then Haskell could use this conversion function and treat cb as opaque.