-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime bug in compiled program. #25
Comments
I should provide the compilation output, at least. https://raw.github.com/gist/3918731/00fb7d680478323131c0c8a457f908a5754043fe/CurrencyConverter.js As you can see, the bug is somewhere in that second to last line... |
I have three theories:
Thanks for providing a test environment, that's going to make it way easier to track this issue down. |
Let me know if the test environment doesn't work for you, I can try to make it more pleasant. In particular, the Makefile should be able to clone the |
Unfortunately, it's not possible to get 64-bit GHC to build anything in 32-bit mode, as it assumes that the build and target architectures are the same. You can build the libraries in 64-bit mode; |
I am able to compile reactive-banana by telling haste to compile all dependency source files at the same time.
However, the resulting program doesn't work and throws the JavaScript error
Unfortunately, I have not been able to distill a minimal example. Reactive-banana uses several techniques that are not referentially transparent, like observable sharing and
unsafePerformIO
, so there might be some problems there, but I really can't tell. Also, I am using value recursion, but it appears that theinstance MonadFix IO
instance works fine haste, so that should be ok, but I don't understand the interactions.I have checked that the code used for the haste version of reactive-banana compiles and works under GHC. In particular, my custom implementation of Data.HashMap is correct as far as I can tell.
To try out the full code, check out the repository
https://github.com/HeinrichApfelmus/reactive-banana/tree/0d933257f615271930395a8a8041d3063676f70b
and download the latest version of vault
https://github.com/HeinrichApfelmus/vault/tree/b944d14393f9bba67f3fdba7c29b9c72e2610f8e
into the parent directory, which should now contain two folders
reactive-banana
andvault
. Then, doto compile the example program. The result can be viewed in the corresponding html file.
The text was updated successfully, but these errors were encountered: