Skip to content

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

Open
@johannesgerer

Description

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions