servant-checked-exceptions-2.0.0.0: Checked exceptions for Servant APIs.

CopyrightDennis Gosnell 2017
LicenseBSD3
MaintainerDennis Gosnell (cdep.illabout@gmail.com)
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Servant.Checked.Exceptions.Internal.Servant.Client

Contents

Description

This module only exports HasClient instances for Throws and Throwing.

Synopsis

Documentation

Orphan instances

(RunClient m, HasClient m ((:>) k * api ((:>) * k1 NoThrow apis))) => HasClient m ((:>) * * NoThrow ((:>) k k1 api apis)) Source #

When NoThrow comes before any other combinator, push it down so it is closer to the Verb.

Associated Types

type Client (m :: * -> *) ((* :> *) NoThrow ((k :> k1) api apis)) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> *) NoThrow ((k :> k1) api apis)) -> Request -> Client m ((* :> *) NoThrow ((k :> k1) api apis)) #

(RunClient m, HasClient m (ThrowingNonterminal ((:>) * * (Throwing es) ((:>) k k1 api apis)))) => HasClient m ((:>) * * (Throwing es) ((:>) k k1 api apis)) Source #

When a Throws e comes immediately after a Throwing es, Snoc the e onto the es. Otherwise, if Throws e comes before any other combinator, push it down so it is closer to the Verb.

Associated Types

type Client (m :: * -> *) ((* :> *) (Throwing es) ((k :> k1) api apis)) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> *) (Throwing es) ((k :> k1) api apis)) -> Request -> Client m ((* :> *) (Throwing es) ((k :> k1) api apis)) #

(RunClient m, HasClient m ((:<|>) ((:>) * * NoThrow api1) ((:>) * * NoThrow api2))) => HasClient m ((:>) * * NoThrow ((:<|>) api1 api2)) Source #

When NoThrow comes before :<|>, push NoThrow into each branch of the API.

Associated Types

type Client (m :: * -> *) ((* :> *) NoThrow (api1 :<|> api2)) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> *) NoThrow (api1 :<|> api2)) -> Request -> Client m ((* :> *) NoThrow (api1 :<|> api2)) #

(RunClient m, HasClient m ((:<|>) ((:>) * * (Throwing es) api1) ((:>) * * (Throwing es) api2))) => HasClient m ((:>) * * (Throwing es) ((:<|>) api1 api2)) Source #

When Throwing es comes before :<|>, push Throwing es into each branch of the API.

Associated Types

type Client (m :: * -> *) ((* :> *) (Throwing es) (api1 :<|> api2)) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> *) (Throwing es) (api1 :<|> api2)) -> Request -> Client m ((* :> *) (Throwing es) (api1 :<|> api2)) #

(RunClient m, HasClient m (Verb k1 * method status ctypes (Envelope ([] *) a))) => HasClient m ((:>) * * NoThrow (Verb k1 * method status ctypes a)) Source #

When NoThrow comes before a Verb, change it into the same Verb but returning an Envelope '[].

Associated Types

type Client (m :: * -> *) ((* :> *) NoThrow (Verb k1 * method status ctypes a)) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> *) NoThrow (Verb k1 * method status ctypes a)) -> Request -> Client m ((* :> *) NoThrow (Verb k1 * method status ctypes a)) #

HasClient m (Verb k1 * method status ctypes (Envelope es a)) => HasClient m ((:>) * * (Throwing es) (Verb k1 * method status ctypes a)) Source #

When Throwing es comes before a Verb, change it into the same Verb but returning an Envelope es.

Associated Types

type Client (m :: * -> *) ((* :> *) (Throwing es) (Verb k1 * method status ctypes a)) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> *) (Throwing es) (Verb k1 * method status ctypes a)) -> Request -> Client m ((* :> *) (Throwing es) (Verb k1 * method status ctypes a)) #

(RunClient m, HasClient m ((:>) * k1 (Throwing ((:) * e ([] *))) api)) => HasClient m ((:>) * k1 (Throws e) api) Source #

Change a Throws into Throwing.

Associated Types

type Client (m :: * -> *) ((* :> k1) (Throws e) api) :: * #

Methods

clientWithRoute :: Proxy (* -> *) m -> Proxy * ((* :> k1) (Throws e) api) -> Request -> Client m ((* :> k1) (Throws e) api) #