From b5d583ae20ecc0a005f1f4367d24b9a1862b3685 Mon Sep 17 00:00:00 2001 From: Samuel Evans-Powell Date: Fri, 3 May 2024 11:18:46 +0800 Subject: [PATCH 1/3] Use new JS backend syntax in js_send foreign import --- ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs b/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs index 574a4dfa..bc427b61 100644 --- a/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs +++ b/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs @@ -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 "((x, y, c) => { h$dom$sendXHR(x, y, c); } )" js_send :: XMLHttpRequest -> JSVal -> IO Int -- | send :: (MonadIO m) => XMLHttpRequest -> m () From 61f5c17f4009e553cdc190aa3ba007b9b2fc5ad0 Mon Sep 17 00:00:00 2001 From: Samuel Evans-Powell Date: Fri, 3 May 2024 17:39:48 +0800 Subject: [PATCH 2/3] Relax constraints on ghcjs-base --- ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal b/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal index 55182329..d641709a 100644 --- a/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal +++ b/ghcjs-dom-jsffi/ghcjs-dom-jsffi.cabal @@ -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 From 80de876d56037dcc555f7480eae63d9bda3b00aa Mon Sep 17 00:00:00 2001 From: "Samuel Bennett (Evans-Powell)" Date: Mon, 6 May 2024 18:04:58 +0800 Subject: [PATCH 3/3] Update ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs Co-authored-by: Sylvain Henry --- ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs b/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs index bc427b61..016a6e9a 100644 --- a/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs +++ b/ghcjs-dom-javascript/src/GHCJS/DOM/JSFFI/XMLHttpRequest.hs @@ -32,7 +32,7 @@ throwXHRError 0 = return () throwXHRError 1 = throwIO XHRAborted throwXHRError 2 = throwIO XHRError -foreign import javascript interruptible "((x, y, c) => { h$dom$sendXHR(x, y, c); } )" js_send :: XMLHttpRequest -> JSVal -> IO Int +foreign import javascript interruptible "h$dom$sendXHR" js_send :: XMLHttpRequest -> JSVal -> IO Int -- | send :: (MonadIO m) => XMLHttpRequest -> m ()