servant-checked-exceptions-0.3.0.1: 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

HasClient * (ThrowingNonterminal ((:>) * * (Throwing es) ((:>) k k1 api apis))) => HasClient * ((:>) * * (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 ((:>) * * (Throwing es) ((:>) k k1 api apis)) (api :: (:>) * * (Throwing es) ((:>) k k1 api apis)) :: * #

Methods

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

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

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

Associated Types

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

Methods

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

HasClient * (Verb * k1 method status ctypes (Envelope es a)) => HasClient * ((:>) * * (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 ((:>) * * (Throwing es) (Verb * k1 method status ctypes a)) (api :: (:>) * * (Throwing es) (Verb * k1 method status ctypes a)) :: * #

Methods

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

HasClient * ((:>) k * (Throwing ((:) * e ([] *))) api) => HasClient * ((:>) k * (Throws e) api) Source #

Change a Throws into Throwing.

Associated Types

type Client ((:>) k * (Throws e) api) (api :: (:>) k * (Throws e) api) :: * #

Methods

clientWithRoute :: Proxy ((k :> *) (Throws e) api) api -> Req -> Client ((k :> *) (Throws e) api) api #