aboutsummaryrefslogtreecommitdiffstats
path: root/backend/lib/ACMS
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/ACMS')
-rw-r--r--backend/lib/ACMS/API/REST.hs4
-rw-r--r--backend/lib/ACMS/API/REST/Collection.hs6
2 files changed, 3 insertions, 7 deletions
diff --git a/backend/lib/ACMS/API/REST.hs b/backend/lib/ACMS/API/REST.hs
index 44c307c..baf9adb 100644
--- a/backend/lib/ACMS/API/REST.hs
+++ b/backend/lib/ACMS/API/REST.hs
@@ -4,8 +4,10 @@ module ACMS.API.REST where
#ifndef ghcjs_HOST_OS
import Network.HTTP.Simple
+import Data.String (IsString(fromString))
#else
import Data.ByteString.Lazy.UTF8 qualified as LB
+import Data.ByteString qualified as B
import Data.Maybe
import Data.String
import JavaScript.Web.XMLHttpRequest
@@ -15,7 +17,6 @@ import Control.Monad.Catch (MonadThrow)
import Data.Aeson qualified as A
import Data.ByteString.Lazy.Char8 qualified as LB
import Data.Function ((&))
-import Data.String (IsString (fromString))
import Miso (JSM)
import Miso.String (MisoString)
@@ -50,7 +51,6 @@ instance APIMonad JSM where
fetch req = LB.fromStrict . getResponseBody <$> httpBS req
#ifdef ghcjs_HOST_OS
-
httpBS :: Request -> JSM (Response B.ByteString)
httpBS req = xhrByteString req
diff --git a/backend/lib/ACMS/API/REST/Collection.hs b/backend/lib/ACMS/API/REST/Collection.hs
index b3faf19..7eea23b 100644
--- a/backend/lib/ACMS/API/REST/Collection.hs
+++ b/backend/lib/ACMS/API/REST/Collection.hs
@@ -5,11 +5,7 @@ module ACMS.API.REST.Collection where
#ifndef ghcjs_HOST_OS
import Network.HTTP.Simple
#else
-import ACMS.API.REST (setRequestMethod, setRequestBodyLBS, getResponseBody)
-import Data.ByteString.Char8 qualified as B
-import Data.Maybe
-import JavaScript.Web.XMLHttpRequest
-import Miso.String qualified as J
+import ACMS.API.REST (setRequestMethod, setRequestBodyLBS)
#endif
import ACMS.API.REST (APIMonad, fetch, restRequest)
import Collection