Skip to content
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

PToJSVal / ToJSVal Discrepancies with ghcjs-dom-jsffi #15

Open
johannesgerer opened this issue Oct 16, 2019 · 0 comments
Open

PToJSVal / ToJSVal Discrepancies with ghcjs-dom-jsffi #15

johannesgerer opened this issue Oct 16, 2019 · 0 comments

Comments

@johannesgerer
Copy link

There a many examples (most Callbacks and other things) of the following differences between:

jsaddle-dom version:

instance ToJSVal VoidCallback where toJSVal (VoidCallback (Callback r)) = toJSVal r

ghcjs-dom-jsffi version:

instance PToJSVal VoidCallback where pToJSVal (VoidCallback (Callback r)) = r

together with the missing in ghcjs-base

instance ToJsVal PToJSval where toJsVal = return . pToJsVal

this breaks code compatibility between GHC and GHCJS.

I am not sure which parts of the ecosystem should be fixed.

  1. Should the above instance added to ghcjs-base?

  2. Should one of ghcjs-dom-jsffi and jsaddle-dom be changed to make VoidCallback have the same instances in both?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant