Use new JS backend syntax in js_send foreign import#105
Merged
hsyl20 merged 3 commits intoghcjs:masterfrom May 6, 2024
Merged
Conversation
Contributor
Author
|
Related to ghcjs/ghcjs-base#136 |
hsyl20
reviewed
May 6, 2024
Contributor
The name of the variable doesn't matter. But yes interruptible FFI functions take an additional continuation argument. See |
Co-authored-by: Sylvain Henry <sylvain@haskus.fr>
Contributor
Author
|
Thanks @hsyl20, this is the kind of feedback I need. I'll test that the suggestion works locally and post back here. |
Contributor
Author
|
I tested it locally with an xhr request and there was no issues 👍 |
hamishmack
added a commit
that referenced
this pull request
May 7, 2024
PR #105 relaxed the `ghcjs-base` bound on `ghcjs-dom-jsffi`, but the fix was for `ghcjs-dom-javascript`. We should not be using both `ghcjs-dom-jsffi` and `ghcjs-dom-javascript` at the same time. Packages should either depend on `ghcjs-dom` only (and let it choose the correct implementation library) or do something like: ``` if impl(ghc >9) build-depends: ghcjs-dom-javascript else build-depends: ghcjs-dom-jsffi ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I believe that some
foreign imports haven't been updated to use the new GHC JS backend syntax.I needed to make this change to get
servant-jsaddleto work.Have I done the correct thing here? I'm particularly dubious about replacing the
$cargument with a named variablec.If this is correct, I can make these changes throughout the codebase.