Skip to content

Commit

Permalink
Use new JS backend syntax in js_send foreign import (#105)
Browse files Browse the repository at this point in the history
* Use new JS backend syntax in js_send foreign import

* Relax constraints on ghcjs-base

* Update ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs

Co-authored-by: Sylvain Henry <sylvain@haskus.fr>

---------

Co-authored-by: Sylvain Henry <sylvain@haskus.fr>
  • Loading branch information
sevanspowell and hsyl20 authored May 6, 2024
1 parent 4f14a23 commit 9b4b41a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ throwXHRError 0 = return ()
throwXHRError 1 = throwIO XHRAborted
throwXHRError 2 = throwIO XHRError

foreign import javascript interruptible "h$dom$sendXHR($1, $2, $c);" js_send :: XMLHttpRequest -> JSVal -> IO Int
foreign import javascript interruptible "h$dom$sendXHR" js_send :: XMLHttpRequest -> JSVal -> IO Int

-- | <https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#send() Mozilla XMLHttpRequest.send documentation>
send :: (MonadIO m) => XMLHttpRequest -> m ()
Expand Down
2 changes: 1 addition & 1 deletion ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ library
build-depends: base <5,
transformers >=0.2 && <0.7,
text >= 0.11.0.6 && < 2.2,
ghcjs-base >=0.2.0.0 && <0.3,
ghcjs-base >=0.2.0.0,
ghc-prim

default-language: Haskell2010
Expand Down

0 comments on commit 9b4b41a

Please sign in to comment.