Safe Haskell | None |
---|---|
Language | Haskell98 |
- module Control.Monad
- module Data.String
- class Monad m => MonadIO m where
- data ByteString :: *
- intercalate :: [a] -> [[a]] -> [a]
- encode :: String -> String
- module Rest.Client.Base
- class ShowUrl a where
- hAccept :: HeaderName
- hContentType :: HeaderName
- data ApiRequest = ApiRequest {
- method :: String
- uri :: String
- params :: [(String, String)]
- requestHeaders :: RequestHeaders
- requestBody :: ByteString
- doRequest :: ApiStateC m => (ByteString -> Reason e) -> (ByteString -> a) -> ApiRequest -> m (ApiResponse e a)
- parseResult :: (ByteString -> Reason e) -> (ByteString -> a) -> Response ByteString -> ApiResponse e a
- fromJSON :: FromJSON a => ByteString -> a
- toJSON :: ToJSON a => a -> ByteString
- fromXML :: XmlStringToType a => ByteString -> a
- toXML :: XmlStringToType a => a -> ByteString
- makeReq :: String -> String -> [[String]] -> [(String, String)] -> RequestHeaders -> ByteString -> ApiRequest
- doReq :: (ApiStateC m, MonadIO m) => ApiRequest -> m (Response ByteString)
Documentation
module Control.Monad
module Data.String
class Monad m => MonadIO m where
Monads in which IO
computations may be embedded.
Any monad built by applying a sequence of monad transformers to the
IO
monad will be an instance of this class.
Instances should satisfy the following laws, which state that liftIO
is a transformer of monads:
MonadIO IO | |
MonadIO m => MonadIO (MaybeT m) | |
MonadIO m => MonadIO (ListT m) | |
MonadIO m => MonadIO (IdentityT m) | |
MonadIO m => MonadIO (ExceptionT m) | |
MonadIO m => MonadIO (ResourceT m) | |
MonadIO m => MonadIO (ApiT m) | |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) | |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) | |
MonadIO m => MonadIO (StateT s m) | |
MonadIO m => MonadIO (StateT s m) | |
MonadIO m => MonadIO (ReaderT r m) | |
(Error e, MonadIO m) => MonadIO (ErrorT e m) | |
MonadIO m => MonadIO (ContT r m) | |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) | |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) |
data ByteString :: *
A space-efficient representation of a Word8
vector, supporting many
efficient operations.
A lazy ByteString
contains 8-bit bytes, or by using the operations
from Data.ByteString.Lazy.Char8 it can be interpreted as containing
8-bit characters.
Eq ByteString | |
Data ByteString | |
Ord ByteString | |
Read ByteString | |
Show ByteString | |
IsString ByteString | |
Monoid ByteString | |
NFData ByteString | |
FoldCase ByteString | |
Semigroup ByteString | |
ToString ByteString | |
Typeable * ByteString |
intercalate :: [a] -> [[a]] -> [a]
intercalate
xs xss
is equivalent to (
.
It inserts the list concat
(intersperse
xs xss))xs
in between the lists in xss
and concatenates the
result.
module Rest.Client.Base
class ShowUrl a where
hAccept :: HeaderName
hContentType :: HeaderName
data ApiRequest Source
ApiRequest | |
|
doRequest :: ApiStateC m => (ByteString -> Reason e) -> (ByteString -> a) -> ApiRequest -> m (ApiResponse e a) Source
parseResult :: (ByteString -> Reason e) -> (ByteString -> a) -> Response ByteString -> ApiResponse e a Source
fromJSON :: FromJSON a => ByteString -> a Source
toJSON :: ToJSON a => a -> ByteString Source
fromXML :: XmlStringToType a => ByteString -> a Source
toXML :: XmlStringToType a => a -> ByteString Source
makeReq :: String -> String -> [[String]] -> [(String, String)] -> RequestHeaders -> ByteString -> ApiRequest Source
doReq :: (ApiStateC m, MonadIO m) => ApiRequest -> m (Response ByteString) Source