Closed wuzzeb closed 9 years ago
This is the same problem as #21, the reason is that unboxed tuple returns aren't automatically wrapped yet. I'll change that in GHCJS soon, apologies for the problem.
Also the same problem as https://github.com/ghcjs/ghcjs/issues/392.
Has been fixed by a change in desugaring foreign imports. Make sure that your GHCJS and boot libraries (run ghcjs-boot with the --clean
option to be sure) are up to date if you still see problems like this.
Here is the simple test program
When I run it with node, I get the error
The functions look like
I added a console.log to
h$$lG
, and the variableb
inside it the javascript list[1, 15, 25]
. The functionh$e
goes on to access thef
property of this list which is undefined.What I guess is the error is that fromListIO is defined as
But
h$fromHsListJSRef
returns a javascript array and we never put a JSRef constructor on this javascript array. I suspect thatjs_toJSArray
should change toBut I don't know why js_toJSArray was defined to expose the State# in the first place.