hello,
Is there any way to export a value of type String?
I have tried it as follows
Haskell code
foreign export f::Int -> IO (StablePtr String)
f:: Int -> IO (StablePtr String)
f n = newStablePtr ("hola")
C code
char *cad;
cad=f(5);
printf("%s",cad);
but it does not go (segmentation fault).
Thanks in advance,
J. Ignacio García