My routine for one binding package is that, a Types.chs for all pointer hook, and some modules containing fun hooks and using Types via import hook.
But when I made another binding package using the same Types (so those two packages can work with each other), since I do not have Types.chs in the second package, I cannot use import hook. And thus, seems like, C2HS knows nothing about the types. And generates ccall-s with wrong signature, for example, IO (Ptr ()) instead of IO (Ptr MyType).
I am manually copying .chi between packages. It works. But requires some manually maintain. I am afraid it would lose sync. Wondering if there is a better way.
My routine for one binding package is that, a Types.chs for all pointer hook, and some modules containing fun hooks and using Types via import hook.
But when I made another binding package using the same Types (so those two packages can work with each other), since I do not have Types.chs in the second package, I cannot use import hook. And thus, seems like, C2HS knows nothing about the types. And generates ccall-s with wrong signature, for example,
IO (Ptr ())
instead ofIO (Ptr MyType)
.