packages feed

free-http 0.1.0.2 → 0.1.1.0

raw patch · 3 files changed

+10/−11 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Network.HTTP.Client.Free.PureClient: runHttp :: Monad m => ignore -> (RequestType client -> ResponseType client) -> FT (HttpF client) m a -> m a
+ Network.HTTP.Client.Free.PureClient: runHttp :: Monad m => (RequestType client -> ResponseType client) -> ignore -> FT (HttpF client) m a -> m a
- Network.HTTP.Client.Free.PureClient: runTHttp :: (Monad m, MonadTrans t, Monad (t m)) => ignore -> (RequestType client -> ResponseType client) -> FT (HttpF client) m a -> t m a
+ Network.HTTP.Client.Free.PureClient: runTHttp :: (Monad m, MonadTrans t, Monad (t m)) => (RequestType client -> ResponseType client) -> ignore -> FT (HttpF client) m a -> t m a

Files

free-http.cabal view
@@ -1,6 +1,6 @@ name:                free-http -version:             0.1.0.2+version:             0.1.1.0  synopsis:            An HTTP Client based on Free Monads. 
src/Network/HTTP/Client/Free.hs view
@@ -7,13 +7,13 @@     -- * Type Families     -- ** Base Request type       RequestType-    -- ** Base REsponse type+    -- ** Base Response type     , ResponseType      -- * Types-    -- ** The base free monad type+    -- ** The base functor from which our free monad is generated.     , HttpF(HttpF)-    -- ** A type alias for 'FT (HttpF client) m a'+    -- ** A helpful type alias     , FreeHttp      -- * smart constructors for http verbs@@ -35,7 +35,6 @@ import Network.HTTP.Types.Method (StdMethod(..)) import Prelude hiding (head) --- | smart constructors get :: Monad m     => RequestType client     -> FT (HttpF client) m (ResponseType client)
src/Network/HTTP/Client/Free/PureClient.hs view
@@ -40,22 +40,22 @@ ------------------------------------------------------------------------------- -- | A pure interpreter based on a client-supplied mocking function runHttp :: Monad m-        => ignore+        => (RequestType client -> ResponseType client)+        -> ignore         -- ^ a parameter that will be ignored. It is included so client's can         -- hot-swap interpreters (many will require a `Manager` type)-        -> (RequestType client -> ResponseType client)         -> FT (HttpF client) m a         -> m a-runHttp _ mock = iterT (iterTHttp mock)+runHttp mock _ = iterT (iterTHttp mock)  ------------------------------------------------------------------------------- -- | A pure interpreter based on a client-supplied mocking function. The under- -- lying monad is `t m`, so computations will be lifted into `t m`. runTHttp :: (Monad m, MonadTrans t, Monad (t m))-         => ignore+         => (RequestType client -> ResponseType client)+         -> ignore          -- ^ a paramter that will be ignored. It is included so client's can          -- host-swap interpreters (many will require a 'Manager' type)-         -> (RequestType client -> ResponseType client)          -> FT (HttpF client) m a          -> t m a-runTHttp _ mock = iterTM (iterTMHttp mock)+runTHttp mock _ = iterTM (iterTMHttp mock)