free-http-0.1.1.0: An HTTP Client based on Free Monads.

Safe HaskellSafe
LanguageHaskell2010

Network.HTTP.Client.Free.ArbitraryClient

Description

An interpreter that fails randomly

Synopsis

Documentation

iterTHttp :: (r ~ ResponseType client, Arbitrary r, Monad m, MonadIO m) => HttpF client (m a) -> m a Source

Peel a layer of the HttpF functor and generate a random Response.

iterTMHttp :: (r ~ ResponseType client, Arbitrary r, Monad m, MonadIO m, MonadTrans t, Monad (t m)) => HttpF client (t m a) -> t m a Source

Peel a layer of the HttpF functor and generate a random Response. This time the base monad is 't m'.

runHttp Source

Arguments

:: (r ~ ResponseType client, Arbitrary r, Monad m, MonadIO m) 
=> ignore

a paramter that will be ignored. It is included so client's can hot-swap interpreters.

-> FT (HttpF client) m a 
-> m a 

The main http-client interpreter. The client is free to specify the base effect monad so long as there is an instance of MonadIO for it in scope.

runTHttp Source

Arguments

:: (r ~ ResponseType client, Arbitrary r, Monad m, MonadIO m, MonadTrans t, Monad (t m)) 
=> ignore

a paramter that will be ignored. It is included so client's can hot-swap interpreters.

-> FT (HttpF client) m a 
-> t m a 

The main http-client interpreter. The client is free to specify the base effect monad (m), and in thise case this the result can be lifted into a higher monad transformer stack (t)