I am able to export simple haskell functions through FFI containing standard data types. However, I do not know how to export a function that takes data type other than standard data types.
E.g.
data SomeType a = SomeType a
data SomeOtherType b = SomeOtherType b
doSomething:: SomeType a -> SomeOtherType b
How can I export function doSomething?
The existing documents talks about very simple examples.