-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Transformer stack of error, reader, writer, state, and prompt monads
--
-- Please see the README on GitHub at
-- https://github.com/nbloomf/script-monad#readme
@package script-monad
@version 0.0.2.1
-- | Script is an unrolled stack of reader, writer, state, error,
-- and prompt monads, meant as a basis for building more specific DSLs.
-- Also comes in monad transformer flavor with ScriptT.
--
-- The addition of prompt to the monad team makes it straightforward to
-- build effectful computations which defer the actual effects (and
-- effect types) to an evaluator function that is both precisely
-- controlled and easily extended. This allows us to build testable and
-- composable API layers.
--
-- The name Script is meant to evoke the script of a play. In the
-- theater sense a script is not a list of instructions so much as
-- a list of suggestions, and every cast gives a unique
-- interpretation. Similarly a Script is a pure value that gets an
-- effectful interpretation from a user-supplied evaluator.
module Control.Monad.Script
-- | Opaque stack of error (e), reader (r), writer
-- (w), state (s), and prompt (p) monads.
type Script e r w s p = ScriptT e r w s p Identity
-- | Execute a Script with a specified initial state and
-- environment, and with a pure evaluator.
execScript :: s -> r -> (forall u. p u -> u) -> Script e r w s p t -> (Either e t, s, w)
-- | Execute a Script with a specified inital state and environment,
-- and with a monadic evaluator.
execScriptM :: Monad eff => s -> r -> (forall u. p u -> eff u) -> Script e r w s p t -> eff (Either e t, s, w)
-- | Opaque transformer stack of error (e), reader (r),
-- writer (w), state (s), and prompt (p)
-- monads.
data ScriptT e r w s p m a
-- | Execute a ScriptT with a specified initial state and
-- environment, and with a pure evaluator.
execScriptT :: Monad m => s -> r -> (forall u. p u -> u) -> ScriptT e r w s p m t -> m (Either e t, s, w)
-- | Execute a ScriptT with a specified inital state and
-- environment, and with a monadic evaluator. In this case the inner
-- monad m will typically be a monad transformer over the effect
-- monad n.
execScriptTM :: (Monad (m eff), Monad eff) => s -> r -> (forall u. p u -> eff u) -> (forall u. eff u -> m eff u) -> ScriptT e r w s p (m eff) t -> m eff (Either e t, s, w)
-- | Lift a computation in the base monad.
lift :: (Monoid w, Monad m) => m a -> ScriptT e r w s p m a
-- | Inject an Either into a Script.
except :: Monoid w => Either e a -> ScriptT e r w s p m a
-- | Run an action, applying a function to any error.
triage :: Monoid w => (e1 -> e2) -> ScriptT e1 r w s p m a -> ScriptT e2 r w s p m a
-- | Raise an error.
throw :: Monoid w => e -> ScriptT e r w s p m a
-- | Run an action, applying a handler in case of an error result.
catch :: Monoid w => ScriptT e r w s p m a -> (e -> ScriptT e r w s p m a) -> ScriptT e r w s p m a
-- | Retrieve the environment.
ask :: Monoid w => ScriptT e r w s p m r
-- | Run an action with a locally adjusted environment of the same type.
local :: (r -> r) -> ScriptT e r w s p m a -> ScriptT e r w s p m a
-- | Run an action with a locally adjusted environment of a possibly
-- different type.
transport :: (r2 -> r1) -> ScriptT e r1 w s p m a -> ScriptT e r2 w s p m a
-- | Retrieve the image of the environment under a given function.
reader :: Monoid w => (r -> a) -> ScriptT e r w s p m a
-- | Write to the log.
tell :: w -> ScriptT e r w s p m ()
-- | Run an action and attach the log to the result, setting the log to
-- mempty.
draft :: Monoid w => ScriptT e r w s p m a -> ScriptT e r w s p m (a, w)
-- | Run an action and attach the log to the result.
listen :: ScriptT e r w s p m a -> ScriptT e r w s p m (a, w)
-- | Run an action that returns a value and a log-adjusting function, and
-- apply the function to the local log.
pass :: ScriptT e r w s p m (a, w -> w) -> ScriptT e r w s p m a
-- | Run an action, applying a function to the local log.
censor :: (w -> w) -> ScriptT e r w s p m a -> ScriptT e r w s p m a
-- | Retrieve the current state.
get :: Monoid w => ScriptT e r w s p m s
-- | Replace the state.
put :: Monoid w => s -> ScriptT e r w s p m ()
-- | Modify the current state lazily.
modify :: Monoid w => (s -> s) -> ScriptT e r w s p m ()
-- | Modify the current state strictly.
modify' :: Monoid w => (s -> s) -> ScriptT e r w s p m ()
-- | Retrieve the image of the current state under a given function.
gets :: Monoid w => (s -> a) -> ScriptT e r w s p m a
-- | Inject an atomic effect.
prompt :: Monoid w => p a -> ScriptT e r w s p m a
-- | Turn a Script with a pure evaluator into a Bool; for
-- testing with QuickCheck. Wraps execScript.
checkScript :: s -> r -> (forall u. p u -> u) -> ((Either e t, s, w) -> q) -> (q -> Bool) -> Script e r w s p t -> Bool
-- | Turn a Script with a monadic evaluator into a Property;
-- for testing with QuickCheck. Wraps execScriptM.
checkScriptM :: Monad eff => s -> r -> (forall u. p u -> eff u) -> (eff (Either e t, s, w) -> IO q) -> (q -> Bool) -> Script e r w s p t -> Property
-- | Turn a ScriptT with a pure evaluator into a Property;
-- for testing with QuickCheck. Wraps execScriptT.
checkScriptT :: Monad m => s -> r -> (forall u. p u -> u) -> (m (Either e t, s, w) -> IO q) -> (q -> Bool) -> ScriptT e r w s p m t -> Property
-- | Turn a ScriptT with a monadic evaluator into a Property;
-- for testing with QuickCheck. Wraps execScriptTM.
checkScriptTM :: (Monad (m eff), Monad eff) => s -> r -> (forall u. p u -> eff u) -> (forall u. eff u -> m eff u) -> (m eff (Either e t, s, w) -> IO q) -> (q -> Bool) -> ScriptT e r w s p (m eff) t -> Property
instance GHC.Base.Monoid w => GHC.Base.Monad (Control.Monad.Script.ScriptT e r w s p m)
instance GHC.Base.Monoid w => GHC.Base.Applicative (Control.Monad.Script.ScriptT e r w s p m)
instance GHC.Base.Monoid w => GHC.Base.Functor (Control.Monad.Script.ScriptT e r w s p m)
instance (GHC.Base.Monad m, GHC.Base.Monoid w, Test.QuickCheck.Arbitrary.Arbitrary a, Test.QuickCheck.Arbitrary.CoArbitrary a) => Test.QuickCheck.Arbitrary.Arbitrary (Control.Monad.Script.ScriptT e r w s p m a)
instance GHC.Show.Show (Control.Monad.Script.ScriptT e r w s p m a)
-- | A fake filesystem for testing.
module Data.MockIO.FileSystem
-- | A mapping from "handles" of type a to lists of lines.
data FileSystem a
FileSystem :: [File a] -> FileSystem a
-- | Abstraction of a text file consisting of a "handle" and a list of
-- lines.
data File a
File :: a -> [String] -> File a
-- | File "handle"
[_fileHandle] :: File a -> a
-- | List of lines
[_fileContents] :: File a -> [String]
-- | No files; populate with writeLines or appendLines.
emptyFileSystem :: FileSystem a
-- | Detect whether a file with the given handle exists.
fileExists :: Eq a => a -> FileSystem a -> Bool
-- | Detect whether a file with the given handle exists and has given
-- contents.
hasFile :: Eq a => a -> [String] -> FileSystem a -> Bool
-- | Delete a file; if no such file exists, has no effect.
deleteFile :: Eq a => a -> FileSystem a -> FileSystem a
-- | Retrieve the contents of a file, or nothing if the file does not
-- exist.
getLines :: Eq a => a -> FileSystem a -> Maybe [String]
-- | Overwrite the contents of a file.
writeLines :: Eq a => a -> [String] -> FileSystem a -> FileSystem a
-- | Append to a file.
appendLines :: Eq a => a -> [String] -> FileSystem a -> FileSystem a
-- | Read the first line of a file.
readLine :: Eq a => e -> e -> a -> FileSystem a -> Either e (String, FileSystem a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.MockIO.FileSystem.File a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.MockIO.FileSystem.FileSystem a)
instance GHC.Show.Show a => GHC.Show.Show (Data.MockIO.FileSystem.FileSystem a)
instance (GHC.Classes.Eq a, Test.QuickCheck.Arbitrary.Arbitrary a) => Test.QuickCheck.Arbitrary.Arbitrary (Data.MockIO.FileSystem.FileSystem a)
instance GHC.Show.Show a => GHC.Show.Show (Data.MockIO.FileSystem.File a)
-- | A fake IO monad for testing.
module Data.MockIO
-- | A state monad over MockWorld.
data MockIO s a
MockIO :: (MockWorld s -> (a, MockWorld s)) -> MockIO s a
[runMockIO] :: MockIO s a -> MockWorld s -> (a, MockWorld s)
-- | Retrieve the current MockWorld.
getMockWorld :: MockIO s (MockWorld s)
-- | Replace the current MockWorld.
putMockWorld :: MockWorld s -> MockIO s ()
-- | Mutate the current MockWorld strictly.
modifyMockWorld :: (MockWorld s -> MockWorld s) -> MockIO s ()
-- | Bump the timer by a given number of microseconds.
incrementTimer :: Int -> MockIO s ()
-- | Just enough state to mock out a basic filesystem and HTTP server.
data MockWorld s
MockWorld :: FileSystem (Either FilePath Handle) -> UTCTime -> (String -> MockNetwork s HttpResponse) -> (String -> ByteString -> MockNetwork s HttpResponse) -> (String -> MockNetwork s HttpResponse) -> MockServer s -> MockWorld s
[_files] :: MockWorld s -> FileSystem (Either FilePath Handle)
[_time] :: MockWorld s -> UTCTime
[_httpGet] :: MockWorld s -> String -> MockNetwork s HttpResponse
[_httpPost] :: MockWorld s -> String -> ByteString -> MockNetwork s HttpResponse
[_httpDelete] :: MockWorld s -> String -> MockNetwork s HttpResponse
[_serverState] :: MockWorld s -> MockServer s
-- | Type representing the internal state of an HTTP server.
newtype MockServer s
MockServer :: s -> MockServer s
[unMockServer] :: MockServer s -> s
-- | 1970-01-01 00:00:00
epoch :: UTCTime
-- | Empty filesystem and trivial HTTP responses
basicMockWorld :: s -> MockWorld s
-- | State monad representing network interaction.
data MockNetwork s a
MockNetwork :: (MockServer s -> (Either HttpException a, MockServer s)) -> MockNetwork s a
[unMockNetwork] :: MockNetwork s a -> MockServer s -> (Either HttpException a, MockServer s)
-- | Throw an HttpException.
errorMockNetwork :: HttpException -> MockNetwork s a
-- | Retrieve the internal state of the fake HTTP server.
getMockServer :: MockNetwork s s
-- | Replace the internal state of the fake HTTP server.
putMockServer :: s -> MockNetwork s ()
-- | Mutate the internal state of the fake HTTP server (strictly).
modifyMockServer :: (s -> s) -> MockNetwork s ()
-- | Status 200; no headers
_200ok :: ByteString -> HttpResponse
-- | Status 400; no headers
_400badRequest :: ByteString -> HttpResponse
-- | Status 404; no headers
_404notFound :: ByteString -> HttpResponse
-- | Status 405; no headers
_405methodNotAllowed :: ByteString -> HttpResponse
-- | Status 408; no headers
_408requestTimeout :: ByteString -> HttpResponse
-- | Status 500; no headers
_500internalServerError :: ByteString -> HttpResponse
instance GHC.Show.Show s => GHC.Show.Show (Data.MockIO.MockServer s)
instance GHC.Classes.Eq s => GHC.Classes.Eq (Data.MockIO.MockServer s)
instance GHC.Base.Monad (Data.MockIO.MockIO s)
instance GHC.Base.Applicative (Data.MockIO.MockIO s)
instance GHC.Base.Functor (Data.MockIO.MockIO s)
instance GHC.Show.Show (Data.MockIO.MockIO s a)
instance Test.QuickCheck.Arbitrary.Arbitrary a => Test.QuickCheck.Arbitrary.Arbitrary (Data.MockIO.MockIO s a)
instance GHC.Classes.Eq s => GHC.Classes.Eq (Data.MockIO.MockWorld s)
instance GHC.Show.Show s => GHC.Show.Show (Data.MockIO.MockWorld s)
instance Test.QuickCheck.Arbitrary.Arbitrary s => Test.QuickCheck.Arbitrary.Arbitrary (Data.MockIO.MockWorld s)
instance Test.QuickCheck.Arbitrary.CoArbitrary s => Test.QuickCheck.Arbitrary.CoArbitrary (Data.MockIO.MockWorld s)
instance GHC.Base.Monad (Data.MockIO.MockNetwork s)
instance GHC.Base.Applicative (Data.MockIO.MockNetwork s)
instance GHC.Base.Functor (Data.MockIO.MockNetwork s)
instance GHC.Show.Show (Data.MockIO.MockNetwork s a)
instance Test.QuickCheck.Arbitrary.Arbitrary a => Test.QuickCheck.Arbitrary.Arbitrary (Data.MockIO.MockNetwork s a)
-- | A basic type and monad for describing HTTP interactions.
module Control.Monad.Script.Http
-- | An HTTP session returning an a, writing to a log of type
-- W e w, reading from an environment of type R e w r,
-- with state of type S s, throwing errors of type E e,
-- performing effectful computations described by P p a.
-- HttpT over Identity.
type Http e r w s p a = HttpT e r w s p Identity a
-- | Execute an Http session.
execHttpM :: Monad eff => S s -> R e w r -> (forall u. P p u -> eff u) -> Http e r w s p t -> eff (Either (E e) t, S s, W e w)
-- | An HTTP session returning an a, writing to a log of type
-- W e w, reading from an environment of type R e w r,
-- with state of type S s, throwing errors of type E e,
-- performing effectful computations described by P p a, and
-- with inner monad m.
data HttpT e r w s p m a
-- | Execute an HttpT session.
execHttpTM :: (Monad (m eff), Monad eff) => S s -> R e w r -> (forall u. P p u -> eff u) -> (forall u. eff u -> m eff u) -> HttpT e r w s p (m eff) t -> m eff (Either (E e) t, S s, W e w)
-- | Lift a value from the inner monad
liftHttpT :: Monad m => m a -> HttpT e r w s p m a
-- | Also logs the exception.
throwError :: e -> HttpT e r w s p m a
-- | Also logs the exception.
throwJsonError :: JsonError -> HttpT e r w s p m a
-- | Also logs the exception.
throwHttpException :: HttpException -> HttpT e r w s p m a
-- | Also logs the exception.
throwIOException :: IOException -> HttpT e r w s p m a
-- | Re-throws other error types.
catchError :: HttpT e r w s p m a -> (e -> HttpT e r w s p m a) -> HttpT e r w s p m a
-- | Re-throws other error types.
catchJsonError :: HttpT e r w s p m a -> (JsonError -> HttpT e r w s p m a) -> HttpT e r w s p m a
-- | Re-throws other error types.
catchHttpException :: HttpT e r w s p m a -> (HttpException -> HttpT e r w s p m a) -> HttpT e r w s p m a
-- | Re-throws other error types.
catchIOException :: HttpT e r w s p m a -> (IOException -> HttpT e r w s p m a) -> HttpT e r w s p m a
-- | Handle any thrown error. To handle only errors of a specific type, see
-- catchError, catchJsonError,
-- catchIOException, or catchHttpException.
catchAnyError :: HttpT e r w s p m a -> (e -> HttpT e r w s p m a) -> (HttpException -> HttpT e r w s p m a) -> (IOException -> HttpT e r w s p m a) -> (JsonError -> HttpT e r w s p m a) -> HttpT e r w s p m a
-- | Pretty printer for errors
printError :: (e -> String) -> E e -> String
-- | Error type.
data E e
-- | Retrieve the environment.
ask :: HttpT e r w s p m (R e w r)
-- | Run an action with a locally adjusted environment of the same type.
local :: (R e w r -> R e w r) -> HttpT e r w s p m a -> HttpT e r w s p m a
-- | Retrieve the image of the environment under a given function.
reader :: (R e w r -> a) -> HttpT e r w s p m a
-- | Generic session environment.
data R e w r
R :: LogOptions e w -> (LogOptions e w -> LogEntry e w -> Maybe String) -> Handle -> Maybe (MVar ()) -> String -> (HttpException -> Maybe e) -> r -> R e w r
[_logOptions] :: R e w r -> LogOptions e w
-- | Printer for log entries.
[_logEntryPrinter] :: R e w r -> LogOptions e w -> LogEntry e w -> Maybe String
-- | Handle for printing logs
[_logHandle] :: R e w r -> Handle
-- | Lock used to prevent race conditions when writing to the log.
[_logLock] :: R e w r -> Maybe (MVar ())
-- | Identifier string for the session; used to help match log entries
-- emitted by the same session.
[_uid] :: R e w r -> String
-- | Function for elevating HttpExceptions to a client-supplied
-- error type.
[_httpErrorInject] :: R e w r -> HttpException -> Maybe e
-- | Client-supplied environment type.
[_env] :: R e w r -> r
-- | Environment constructor
basicEnv :: (Show e, Show w) => r -> R e w r
-- | Environment constructor
trivialEnv :: r -> R e w r
-- | Options for tweaking the logs.
data LogOptions e w
LogOptions :: Bool -> Bool -> Bool -> LogSeverity -> Bool -> (Bool -> e -> String) -> (Bool -> w -> String) -> LogOptions e w
-- | Toggle color
[_logColor] :: LogOptions e w -> Bool
-- | Toggle JSON pretty printing
[_logJson] :: LogOptions e w -> Bool
-- | Toggle to silence the logs
[_logSilent] :: LogOptions e w -> Bool
-- | Suppress log output below this severity
[_logMinSeverity] :: LogOptions e w -> LogSeverity
-- | Toggle for printing HTTP headers
[_logHeaders] :: LogOptions e w -> Bool
-- | Printer for client-supplied error type. The boolean toggles JSON
-- pretty printing.
[_printUserError] :: LogOptions e w -> Bool -> e -> String
-- | Printer for client-supplied log type. the boolean toggles JSON pretty
-- printing.
[_printUserLog] :: LogOptions e w -> Bool -> w -> String
-- | Noisy, in color, without parsing JSON responses, and using Show
-- instances for user-supplied error and log types.
basicLogOptions :: (Show e, Show w) => LogOptions e w
-- | Noisy, in color, without parsing JSON responses, and using trivial
-- printers for user-supplied error and log types. For testing.
trivialLogOptions :: LogOptions e w
-- | Extract the user-defined log entries.
logEntries :: W e w -> [w]
-- | Syslog style log severities.
data LogSeverity
-- | Debug-level messages
LogDebug :: LogSeverity
-- | Informational messages
LogInfo :: LogSeverity
-- | Normal but significant condition
LogNotice :: LogSeverity
-- | Warning conditions
LogWarning :: LogSeverity
-- | Error conditions
LogError :: LogSeverity
-- | Critical conditions
LogCritical :: LogSeverity
-- | Action must be taken immediately
LogAlert :: LogSeverity
-- | System is unusable
LogEmergency :: LogSeverity
-- | Set the severity level of all log actions in a session.
setLogSeverity :: LogSeverity -> HttpT e r w s p m a -> HttpT e r w s p m a
-- | Log type
data W e w
-- | All log statements should go through logNow.
printHttpLogs :: Handle -> Maybe (MVar ()) -> LogOptions e w -> (LogOptions e w -> LogEntry e w -> Maybe String) -> W e w -> IO ()
-- | Simple default pretty printer for LogEntrys.
basicLogEntryPrinter :: LogOptions e w -> LogEntry e w -> Maybe String
-- | Retrieve the image of the current state under a given function.
gets :: (S s -> a) -> HttpT e r w s p m a
-- | Modify the current state strictly.
modify :: (S s -> S s) -> HttpT e r w s p m ()
-- | State type
data S s
S :: Options -> Maybe Session -> s -> S s
[_httpOptions] :: S s -> Options
[_httpSession] :: S s -> Maybe Session
[_userState] :: S s -> s
-- | State constructor
basicState :: s -> S s
-- | Inject an atomic effect.
prompt :: P p a -> HttpT e r w s p m a
-- | Atomic effects
data P p a
[HPutStrLn] :: Handle -> String -> P p (Either IOException ())
[HPutStrLnBlocking] :: MVar () -> Handle -> String -> P p (Either IOException ())
[GetSystemTime] :: P p UTCTime
[ThreadDelay] :: Int -> P p ()
[HttpGet] :: Options -> Maybe Session -> Url -> P p (Either HttpException HttpResponse)
[HttpPost] :: Options -> Maybe Session -> Url -> ByteString -> P p (Either HttpException HttpResponse)
[HttpDelete] :: Options -> Maybe Session -> Url -> P p (Either HttpException HttpResponse)
[P] :: p a -> P p a
-- | Basic evaluator for interpreting atomic Http effects in
-- IO.
evalIO :: (p a -> IO a) -> P p a -> IO a
-- | Basic evaluator for interpreting atomic Http effects in
-- MockIO.
evalMockIO :: (p a -> MockIO s a) -> P p a -> MockIO s a
-- | Write a comment to the log
comment :: String -> HttpT e r w s p m ()
-- | Pause the thread
wait :: Int -> HttpT e r w s p m ()
-- | For debug level messages
logDebug :: w -> HttpT e r w s p m ()
-- | For informational messages
logInfo :: w -> HttpT e r w s p m ()
-- | For normal but significant conditions
logNotice :: w -> HttpT e r w s p m ()
-- | For warning conditions
logWarning :: w -> HttpT e r w s p m ()
-- | For error conditions
logError :: w -> HttpT e r w s p m ()
-- | For critical conditions
logCritical :: w -> HttpT e r w s p m ()
-- | Action must be taken immediately
logAlert :: w -> HttpT e r w s p m ()
-- | System is unusable
logEmergency :: w -> HttpT e r w s p m ()
-- | Write a line to a handle
hPutStrLn :: Handle -> String -> HttpT e r w s p m ()
-- | Write a line to a handle, using the given MVar as a lock
hPutStrLnBlocking :: MVar () -> Handle -> String -> HttpT e r w s p m ()
-- | Run a GET request
httpGet :: Url -> HttpT e r w s p m HttpResponse
-- | Run a GET request, but do not write the request or response
-- to the logs.
httpSilentGet :: Url -> HttpT e r w s p m HttpResponse
-- | Run a POST request
httpPost :: Url -> ByteString -> HttpT e r w s p m HttpResponse
-- | Run a POST request, but do not write the request or response
-- to the logs.
httpSilentPost :: Url -> ByteString -> HttpT e r w s p m HttpResponse
-- | Run a DELETE request
httpDelete :: Url -> HttpT e r w s p m HttpResponse
-- | Run a DELETE request, but do not write the request or
-- response to the logs.
httpSilentDelete :: Url -> HttpT e r w s p m HttpResponse
-- | Parse a ByteString to a JSON Value.
parseJson :: ByteString -> HttpT e r w s p m Value
-- | Object member lookup.
lookupKeyJson :: Text -> Value -> HttpT e r w s p m Value
-- | Decode a Value to some other type.
constructFromJson :: FromJSON a => Value -> HttpT e r w s p m a
-- | To make type signatures nicer
type Url = String
-- | Represents the kinds of errors that can occur when parsing and
-- decoding JSON.
data JsonError
-- | A generic JSON error; try not to use this.
JsonError :: String -> JsonError
-- | A failed parse.
JsonParseError :: ByteString -> JsonError
-- | An attempt to look up the value of a key that does not exist on an
-- object.
JsonKeyDoesNotExist :: Text -> Value -> JsonError
-- | An attempt to look up the value of a key on something other than an
-- object.
JsonKeyLookupOffObject :: Text -> Value -> JsonError
-- | A failed attempt to convert a Value to some other type.
JsonConstructError :: String -> JsonError
-- | Non-opaque HTTP response type.
data HttpResponse
HttpResponse :: Status -> HttpVersion -> ResponseHeaders -> ByteString -> CookieJar -> HttpResponse
[_responseStatus] :: HttpResponse -> Status
[_responseVersion] :: HttpResponse -> HttpVersion
[_responseHeaders] :: HttpResponse -> ResponseHeaders
[_responseBody] :: HttpResponse -> ByteString
[_responseCookieJar] :: HttpResponse -> CookieJar
-- | Turn an Http into a Property; for testing with
-- QuickCheck.
checkHttpM :: Monad eff => S s -> R e w r -> (forall u. P p u -> eff u) -> (eff (Either (E e) t, S s, W e w) -> IO q) -> (q -> Bool) -> Http e r w s p t -> Property
-- | Turn an HttpT into a property; for testing with QuickCheck.
checkHttpTM :: (Monad (m eff), Monad eff) => S s -> R e w r -> (forall u. P p u -> eff u) -> (forall u. eff u -> m eff u) -> (m eff (Either (E e) t, S s, W e w) -> IO q) -> (q -> Bool) -> HttpT e r w s p (m eff) t -> Property
instance (GHC.Show.Show e, GHC.Show.Show w) => GHC.Show.Show (Control.Monad.Script.Http.W e w)
instance (GHC.Show.Show e, GHC.Show.Show w) => GHC.Show.Show (Control.Monad.Script.Http.LogEntry e w)
instance (GHC.Show.Show e, GHC.Show.Show w) => GHC.Show.Show (Control.Monad.Script.Http.Log e w)
instance GHC.Show.Show Control.Monad.Script.Http.HttpVerb
instance GHC.Classes.Eq Control.Monad.Script.Http.HttpVerb
instance GHC.Base.Functor (Control.Monad.Script.Http.HttpT e r w s p m)
instance GHC.Base.Applicative (Control.Monad.Script.Http.HttpT e r w s p m)
instance GHC.Base.Monad (Control.Monad.Script.Http.HttpT e r w s p m)
instance GHC.Base.Semigroup (Control.Monad.Script.Http.W e w)
instance GHC.Base.Monoid (Control.Monad.Script.Http.W e w)