From d0d1215913dbdd44b62cf584100a9db18aaf83b2 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Wed, 19 Feb 2025 17:36:34 +0100 Subject: fix frontend build --- backend/lib/ACMS/API/REST.hs | 4 ++-- backend/lib/ACMS/API/REST/Collection.hs | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'backend') 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 -- cgit v1.2.3