servant-server-0.19.2: A family of combinators for defining webservices APIs and serving them
Safe Haskell None
Language Haskell2010

Servant

Synopsis

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).

For implementing servers for servant APIs.

Utilities on top of the servant core

Useful re-exports

data Proxy (t :: k) Source #

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

>>> Proxy :: Proxy (Void, Int -> Int)
Proxy

Proxy can even hold types of higher kinds,

>>> Proxy :: Proxy Either
Proxy
>>> Proxy :: Proxy Functor
Proxy
>>> Proxy :: Proxy complicatedStructure
Proxy

Constructors

Proxy

Instances

Instances details
Generic1 ( Proxy :: k -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

Monad ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Applicative ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Foldable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Traversable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Alternative ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

MonadPlus ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Eq1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool ) -> Proxy a -> Proxy b -> Bool Source #

Ord1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Read1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Show1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Hashable1 ( Proxy :: Type -> Type )
Instance details

Defined in Data.Hashable.Class

Bounded ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Eq ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ord ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Read ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Show ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ix ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Generic ( Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Proxy t) :: Type -> Type Source #

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Hashable ( Proxy a)
Instance details

Defined in Data.Hashable.Class

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 Source #

Is used within a monadic computation to begin exception processing.