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

Safe HaskellSafe-Inferred
LanguageHaskell2010

Servant.API.Alternative

Synopsis

Documentation

data a :<|> b infixr 8 Source

Union of two APIs, first takes precedence in case of overlap.

Example:

>>> :{
type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
       :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] () -- POST /books
:}

Constructors

a :<|> b infixr 8 

Instances

(Eq a, Eq b) => Eq ((:<|>) a b) 
(Show a, Show b) => Show ((:<|>) a b) 
(Monoid a, Monoid b) => Monoid ((:<|>) a b) 
Typeable (* -> * -> *) (:<|>)