Closed agocorona closed 7 years ago
I think this works ok with the latest commit of ghcjs-base
I have tried it again. Unregistered ghcjs-base, cloned the last commit, compiled and it still produce the same error....
I'm using windows by the way. GHCJS version 0.2.0 (GHC 7.10.2)
Trying other things. It may be triggered by another error in my server app....
It appears in chrome, but not in edge/explorer. I also have some problems with the protocol in the server side. So I will close this until I have a more clear case
I'm reporting here the same problem. I investigated the generated files. In the ghcjs-base installation directory, the generated libHSghcjs-base-0.2.0.0-*-js_a file has the code in jsbits/websocket.js. But the generated lib.js for my app doesn't have the h$openWebSocket, h$closeWebSocket functions from websocket.js! But all code in other jsbits files like jsbits/array.js, jsbits/jsstring.js are all included in the lib.js. Why only the websocket.js code is excluded in the result? It's really weird.
I tried reinstalling ghcjs-base with the newest version several times and it doesn't help. At last, deleting .ghcjs directory and run 'ghcjs-boot' again solved the problem by installing the latest version in the global directory. It seems when compiling packages, ghcjs is using the ghcjs-base package in the global directory but not the newer user .ghcjs directory. Is this a problem?
Looks like this is fixed.
Here is the program and the error:
https://gist.github.com/agocorona/c1765b72ec915a53489f