main = simpleHTTP nullConf $ ok "Everything is OK"
main = simpleHTTP nullConf $ noContent "This will be ignored."
main = simpleHTTP nullConf $ internalServerError "Sorry, there was an internal server error."
main = simpleHTTP nullConf $ badGateway "Bad Gateway."
main = simpleHTTP nullConf $ badRequest "Bad Request."
main = simpleHTTP nullConf $ unauthorized "You are not authorized."
main = simpleHTTP nullConf $ forbidden "Sorry, it is forbidden."
main = simpleHTTP nullConf $ notFound "What you are looking for has not been found."
main = simpleHTTP nullConf $ requestEntityTooLarge "That's too big for me to handle."
runThrow (throwError e >>= k) = runThrow (throwError e)
>>> import Control.Monad.Except (runExcept) >>> throwEnvelopeErr "BAD_ERROR" "a very bad error occurred!" :: Either (Err String) Int Left (Err {errErr = "BAD_ERROR", errExtra = Just "a very bad error occurred!"})
foo :: IO (String, String, String) foo = replicateT getLine
> foo Hello world ! ("Hello","world","!")
>>> pure 1 :: Maybe Int Just 1
>>> pure 'z' :: [Char] "z"
>>> pure (pure ":D") :: Maybe [String] Just [":D"]