I am making a code generator that reads source and generating some wrappers. It worked fine with my own source. But failed with C2HS result since C2HS generated source uses param omitting.
For example, when I defined a Rect type with pointer hook, I would get a withRect function as withRect (Rect fptr) = C2HSImp.withForeignPtr fptr which omits the last param.
Since withRect is generated and not supposed to be read by human, I wonder why it was like this. Analyzing code and refill the parts seems really complex to me....
I am making a code generator that reads source and generating some wrappers. It worked fine with my own source. But failed with C2HS result since C2HS generated source uses param omitting.
For example, when I defined a
Rect
type with pointer hook, I would get awithRect
function aswithRect (Rect fptr) = C2HSImp.withForeignPtr fptr
which omits the last param.Since
withRect
is generated and not supposed to be read by human, I wonder why it was like this. Analyzing code and refill the parts seems really complex to me....