servant-server-0.20: A family of combinators for defining webservices APIs and serving them

Safe Haskell | Safe-Inferred
Language | Haskell2010

Servant

Synopsis

- module Servant.API
- module Servant.Server
- module Servant.Links
- module Servant.Server.StaticFiles
- data Proxy (t :: k) = Proxy
- throwError :: MonadError e m => e -> m a

# Documentation

This module and its submodules can be used to define servant APIs. Note that these API definitions don't directly implement a server (or anything else).

module Servant.API

For implementing servers for servant APIs.

module Servant.Server

Utilities on top of the servant core

module Servant.Links

module Servant.Server.StaticFiles

Useful re-exports

data Proxy (t :: k) #

Constructors

Proxy |

#### Instances

Instances details

Generic1 (Proxy :: k -> Type) |
Instance details Defined in GHC.Generics Associated Types type Rep1 Proxy :: k -> Type Methods from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a
Foldable (Proxy :: Type -> Type) |

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Proxy m -> m

foldMap :: Monoid m => (a -> m) -> Proxy a -> m

foldMap' :: Monoid m => (a -> m) -> Proxy a -> m

foldr :: (a -> b -> b) -> b -> Proxy a -> b

foldr' :: (a -> b -> b) -> b -> Proxy a -> b

foldl :: (b -> a -> b) -> b -> Proxy a -> b

foldl' :: (b -> a -> b) -> b -> Proxy a -> b

foldr1 :: (a -> a -> a) -> Proxy a -> a

foldl1 :: (a -> a -> a) -> Proxy a -> a

toList :: Proxy a -> [a]

null :: Proxy a -> Bool

length :: Proxy a -> Int

elem :: Eq a => a -> Proxy a -> Bool

maximum :: Ord a => Proxy a -> a

minimum :: Ord a => Proxy a -> a

sum :: Num a => Proxy a -> a

product :: Num a => Proxy a -> a

Traversable (Proxy :: Type -> Type) |
Instance details Defined in Data.Traversable Methods traverse :: Applicative f => (a -> f b) -> Proxy a -> f (Proxy b) sequenceA :: Applicative f => Proxy (f a) -> f (Proxy a) mapM :: Monad m => (a -> m b) -> Proxy a -> m (Proxy b) # sequence :: Monad m => Proxy (m a) -> m (Proxy a) #
Alternative (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods empty :: Proxy a (<|>) :: Proxy a -> Proxy a -> Proxy a # some :: Proxy a -> Proxy [a] # many :: Proxy a -> Proxy [a] #
Applicative (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods pure :: a -> Proxy a # (<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b # liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c # (*>) :: Proxy a -> Proxy b -> Proxy b # (<*) :: Proxy a -> Proxy b -> Proxy a #
Functor (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods fmap :: (a -> b) -> Proxy a -> Proxy b # (<$) :: a -> Proxy b -> Proxy a #
Monad (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods (>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b # (>>) :: Proxy a -> Proxy b -> Proxy b # return :: a -> Proxy a #
MonadPlus (Proxy :: Type -> Type) |
Instance details Defined in Data.Proxy Methods mzero :: Proxy a # mplus :: Proxy a -> Proxy a -> Proxy a #
NFData1 (Proxy :: Type -> Type) |
Instance details Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> Proxy a -> ()
Hashable1 (Proxy :: Type -> Type) |
Instance details Defined in Data.Hashable.Class Methods liftHashWithSalt :: (Int -> a -> Int) -> Int -> Proxy a -> Int #
Monoid (Proxy s) |
Instance details Defined in Data.Proxy Methods mempty :: Proxy s # mappend :: Proxy s -> Proxy s -> Proxy s # mconcat :: [Proxy s] -> Proxy s #
Semigroup (Proxy s) |
Instance details Defined in Data.Proxy Methods (<>) :: Proxy s -> Proxy s -> Proxy s # sconcat :: NonEmpty (Proxy s) -> Proxy s # stimes :: Integral b => b -> Proxy s -> Proxy s #
Bounded (Proxy t) |
Instance details Defined in Data.Proxy Methods minBound :: Proxy t # maxBound :: Proxy t #
Enum (Proxy s) |
Instance details Defined in Data.Proxy Methods succ :: Proxy s -> Proxy s # pred :: Proxy s -> Proxy s # toEnum :: Int -> Proxy s # fromEnum :: Proxy s -> Int # enumFrom :: Proxy s -> [Proxy s] # enumFromThen :: Proxy s -> Proxy s -> [Proxy s] # enumFromTo :: Proxy s -> Proxy s -> [Proxy s] # enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #
Generic (Proxy t) |
Instance details Defined in GHC.Generics Associated Types type Rep (Proxy t) :: Type -> Type # Methods from :: Proxy t -> Rep (Proxy t) x # to :: Rep (Proxy t) x -> Proxy t #
Ix (Proxy s) |
Instance details Defined in Data.Proxy Methods range :: (Proxy s, Proxy s) -> [Proxy s] index :: (Proxy s, Proxy s) -> Proxy s -> Int unsafeIndex :: (Proxy s, Proxy s) -> Proxy s -> Int inRange :: (Proxy s, Proxy s) -> Proxy s -> Bool rangeSize :: (Proxy s, Proxy s) -> Int unsafeRangeSize :: (Proxy s, Proxy s) -> Int
Read (Proxy t) |
Instance details Defined in Data.Proxy Methods readsPrec :: Int -> ReadS (Proxy t) # readList :: ReadS [Proxy t] # readPrec :: ReadPrec (Proxy t) # readListPrec :: ReadPrec [Proxy t] #
Show (Proxy s) |
Instance details Defined in Data.Proxy Methods showsPrec :: Int -> Proxy s -> ShowS # show :: Proxy s -> String # showList :: [Proxy s] -> ShowS #
NFData (Proxy a) |
Instance details Defined in Control.DeepSeq Methods rnf :: Proxy a -> ()
Eq (Proxy s) |
Instance details Defined in Data.Proxy Methods (==) :: Proxy s -> Proxy s -> Bool # (/=) :: Proxy s -> Proxy s -> Bool #
Ord (Proxy s) |
Instance details Defined in Data.Proxy Methods compare :: Proxy s -> Proxy s -> Ordering # (<) :: Proxy s -> Proxy s -> Bool # (<=) :: Proxy s -> Proxy s -> Bool # (>) :: Proxy s -> Proxy s -> Bool # (>=) :: Proxy s -> Proxy s -> Bool # max :: Proxy s -> Proxy s -> Proxy s # min :: Proxy s -> Proxy s -> Proxy s #
Hashable (Proxy a) |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Proxy a -> Int # hash :: Proxy a -> Int #
type Rep1 (Proxy :: k -> Type) |
Instance details Defined in GHC.Generics type Rep1 (Proxy :: k -> Type) = D1 ('MetaData "Proxy" "Data.Proxy" "base" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: k -> Type))
type Rep (Proxy t) |
Instance details Defined in GHC.Generics type Rep (Proxy t) = D1 ('MetaData "Proxy" "Data.Proxy" "base" 'False) (C1 ('MetaCons "Proxy" 'PrefixI 'False) (U1 :: Type -> Type))

throwError :: MonadError e m => e -> m a #