servant-0.20.3.0: A family of combinators for defining webservices APIs

Safe Haskell | None
Language | Haskell2010

Servant.Types.Internal.Response

Description

This module offers other servant libraries a minimalistic HTTP response type.

It is purely an internal API and SHOULD NOT be used by end-users of Servant.

# Documentation

data InternalResponse a Source #

Constructors

InternalResponse |

Fields

- statusCode :: Status
- headers :: Seq Header
- responseBody :: a

#### Instances

Instances details

Functor InternalResponse Source # |
Instance details Defined in Servant.Types.Internal.Response Methods fmap :: (a -> b) -> InternalResponse a -> InternalResponse b Source # (<$) :: a -> InternalResponse b -> InternalResponse a Source #
Foldable InternalResponse Source # |

Instance details

Defined in Servant.Types.Internal.Response

Methods

fold :: Monoid m => InternalResponse m -> m Source #

foldMap :: Monoid m => (a -> m) -> InternalResponse a -> m Source #

foldMap' :: Monoid m => (a -> m) -> InternalResponse a -> m Source #

foldr :: (a -> b -> b) -> b -> InternalResponse a -> b Source #

foldr' :: (a -> b -> b) -> b -> InternalResponse a -> b Source #

foldl :: (b -> a -> b) -> b -> InternalResponse a -> b Source #

foldl' :: (b -> a -> b) -> b -> InternalResponse a -> b Source #

foldr1 :: (a -> a -> a) -> InternalResponse a -> a Source #

foldl1 :: (a -> a -> a) -> InternalResponse a -> a Source #

toList :: InternalResponse a -> [a] Source #

null :: InternalResponse a -> Bool Source #

length :: InternalResponse a -> Int Source #

elem :: Eq a => a -> InternalResponse a -> Bool Source #

maximum :: Ord a => InternalResponse a -> a Source #

minimum :: Ord a => InternalResponse a -> a Source #

sum :: Num a => InternalResponse a -> a Source #

product :: Num a => InternalResponse a -> a Source #

Traversable InternalResponse Source # |

Instance details

Defined in Servant.Types.Internal.Response

Methods

traverse :: Applicative f => (a -> f b) -> InternalResponse a -> f (InternalResponse b) Source #

sequenceA :: Applicative f => InternalResponse (f a) -> f (InternalResponse a) Source #

mapM :: Monad m => (a -> m b) -> InternalResponse a -> m (InternalResponse b) Source #

sequence :: Monad m => InternalResponse (m a) -> m (InternalResponse a) Source #

Generic (InternalResponse a) Source # |

Instance details

Defined in Servant.Types.Internal.Response

Associated Types

type Rep (InternalResponse a) |

Instance details

Defined in Servant.Types.Internal.Response

type Rep (InternalResponse a) = D1 ('MetaData "InternalResponse" "Servant.Types.Internal.Response" "servant-0.20.3.0-FHJyKhVqWFv2rTftFmLybU" 'False) (C1 ('MetaCons "InternalResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "statusCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "headers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Header)) :*: S1 ('MetaSel ('Just "responseBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))

Methods

from :: InternalResponse a -> Rep (InternalResponse a) x Source #

to :: Rep (InternalResponse a) x -> InternalResponse a Source #

Show a => Show (InternalResponse a) Source # |
Instance details Defined in Servant.Types.Internal.Response Methods showsPrec :: Int -> InternalResponse a -> ShowS Source # show :: InternalResponse a -> String Source # showList :: [InternalResponse a] -> ShowS Source #
Eq a => Eq (InternalResponse a) Source # |
Instance details Defined in Servant.Types.Internal.Response Methods (==) :: InternalResponse a -> InternalResponse a -> Bool Source # (/=) :: InternalResponse a -> InternalResponse a -> Bool Source #
type Rep (InternalResponse a) Source # |

Instance details

Defined in Servant.Types.Internal.Response

type Rep (InternalResponse a) = D1 ('MetaData "InternalResponse" "Servant.Types.Internal.Response" "servant-0.20.3.0-FHJyKhVqWFv2rTftFmLybU" 'False) (C1 ('MetaCons "InternalResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "statusCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Status) :*: (S1 ('MetaSel ('Just "headers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Header)) :*: S1 ('MetaSel ('Just "responseBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))))