mirror of
https://github.com/ilyakooo0/servant-reflex.git
synced 2024-09-11 07:15:29 +03:00
Fix types for jsaddle, bump deps
This commit is contained in:
parent
e708bcf3f3
commit
7acb4778b9
2
deps/servant-snap
vendored
2
deps/servant-snap
vendored
@ -1 +1 @@
|
||||
Subproject commit 2ba429d60b2461bf0d6641f5bf94f615d7c3bc9c
|
||||
Subproject commit b29e851e28f5adc1d9726e287f0691d77e854a9c
|
@ -19,7 +19,7 @@ import Servant.API
|
||||
import API
|
||||
import Data.Proxy
|
||||
import Text.Read (readMaybe)
|
||||
import Reflex.Dom
|
||||
import Reflex.Dom hiding (run)
|
||||
------------------------------------------------------------------------------
|
||||
import Servant.Reflex
|
||||
import Servant.Reflex.Multi
|
||||
|
@ -8,28 +8,5 @@ let
|
||||
in
|
||||
reflex-platform.ghcjs.override {
|
||||
overrides = self: super: {
|
||||
servant = dontCheck (self.callPackage (cabal2nixResult deps/servant/servant) {});
|
||||
http-api-data = dontCheck (self.callPackage (cabal2nixResult deps/http-api-data) {});
|
||||
natural-transformation = self.callPackage (
|
||||
{ mkDerivation, base, containers, fetchgit, quickcheck-instances
|
||||
, stdenv, tasty, tasty-quickcheck
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "natural-transformation";
|
||||
version = "0.4";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/ku-fpg/natural-transformation";
|
||||
sha256 = "0xbnnxbf5ydszbhf7h5ra3mrqy4mcyqc3zb2k8bwm1zyqrz6v0fs";
|
||||
rev = "b1200c09dcafd034e32846413913b74735c8ba56";
|
||||
};
|
||||
libraryHaskellDepends = [ base ];
|
||||
testHaskellDepends = [
|
||||
base containers quickcheck-instances tasty tasty-quickcheck
|
||||
];
|
||||
homepage = "https://github.com/ku-fpg/natural-transformation";
|
||||
description = "A natural transformation package";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
}
|
||||
) {};
|
||||
};
|
||||
}
|
||||
|
@ -32,9 +32,10 @@ library
|
||||
containers >= 0.5.6 && < 0.6,
|
||||
data-default >= 0.5 && < 0.8,
|
||||
exceptions >= 0.8 && < 0.9,
|
||||
ghcjs-dom >= 0.2 && < 0.3,
|
||||
ghcjs-dom >= 0.2 && < 0.8,
|
||||
http-api-data >= 0.2 && < 0.4,
|
||||
http-media >= 0.6 && < 0.7,
|
||||
jsaddle >= 0.8.1 && < 0.9,
|
||||
mtl >= 2.2.1 && < 2.3,
|
||||
network-uri >= 2.6 && < 2.7,
|
||||
reflex >= 0.5 && < 0.6,
|
||||
|
@ -20,18 +20,19 @@ module Servant.Common.BaseUrl (
|
||||
) where
|
||||
|
||||
import Control.Monad (join)
|
||||
import Control.Monad.IO.Class (MonadIO)
|
||||
-- import Control.Monad.IO.Class (MonadIO)
|
||||
import Control.Monad.Fix (MonadFix)
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import GHC.Generics
|
||||
import Language.Javascript.JSaddle.Monad (MonadJSM)
|
||||
import Reflex
|
||||
import Reflex.Dom
|
||||
import Text.Read
|
||||
|
||||
|
||||
type SupportsServantReflex t m = (Reflex t, TriggerEvent t m, PerformEvent t m, HasWebView (Performable m), MonadIO (Performable m))
|
||||
type SupportsServantReflex t m = (Reflex t, TriggerEvent t m, PerformEvent t m, HasWebView (Performable m), MonadJSM (Performable m))
|
||||
|
||||
-- | URI scheme to use
|
||||
data Scheme =
|
||||
|
@ -25,6 +25,7 @@ import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as TE
|
||||
import Data.Traversable (forM)
|
||||
import Language.Javascript.JSaddle.Monad (JSM, MonadJSM)
|
||||
import Reflex.Dom hiding (tag)
|
||||
import Servant.Common.BaseUrl (BaseUrl, showBaseUrl,
|
||||
SupportsServantReflex)
|
||||
@ -255,6 +256,7 @@ performRequests reqMeth rs reqHost trigger = do
|
||||
-- | Issues a collection of requests when the supplied Event fires. When ALL requests from a given firing complete, the results are collected and returned via the return Event.
|
||||
performSomeRequestsAsync
|
||||
:: (MonadIO (Performable m),
|
||||
MonadJSM (Performable m),
|
||||
HasWebView (Performable m),
|
||||
PerformEvent t m,
|
||||
TriggerEvent t m,
|
||||
@ -270,7 +272,7 @@ performSomeRequestsAsync = performSomeRequestsAsync' newXMLHttpRequest . fmap re
|
||||
-- that accepts 'f (Either e (XhrRequestb))' events
|
||||
performSomeRequestsAsync'
|
||||
:: (MonadIO (Performable m), PerformEvent t m, TriggerEvent t m, Traversable f)
|
||||
=> (XhrRequest b -> (a -> IO ()) -> Performable m XMLHttpRequest)
|
||||
=> (XhrRequest b -> (a -> JSM ()) -> Performable m XMLHttpRequest)
|
||||
-> Event t (Performable m (f (Either Text (XhrRequest b)))) -> m (Event t (f (Either Text a)))
|
||||
performSomeRequestsAsync' newXhr req = performEventAsync $ ffor req $ \hrs cb -> do
|
||||
rs <- hrs
|
||||
|
Loading…
Reference in New Issue
Block a user