Closed jaburns closed 9 years ago
This sounds familiar but I'm not sure. It would be nice if someone could step through in the debugger and see what goes wrong in the runtime, can't promise I'll be able to do it anytime soon.
No worries, I might take a look at it myself if I have the time. It was easy enough to work around though. I think this only happens with functions declared at the top level in the module, rather than functions which are members of a data structure.
Another workaround for this is to not use lists, e.g.
data Vector a
Data Stuff = Stuff { stuff :: Vector Int }
Merged in 93f4f91
When calling Fay code from JavaScript, if the the Fay module is compiled using
--strict
, data structures containing lists or tuples will have those lists or tuples empty. It should be noted as well that fields which are not lists or tuples work fine when using the uncurried function invoke from JS, including nested data types.Fay code (BugDemo.hs)
Compilation
Test page (demo.html)
Console output from
demo.html