git.iko.soy/typeable/servant
on 98e02ea help sign in
11 lines 317 B history raw
1{-# LANGUAGE TypeOperators #-}
2module Servant.API.Alternative where
4-- | Union of two APIs, first takes precedence in case of overlap.
5--
6-- Example:
7--
8-- > type MyApi = "books" :> Get [Book] -- GET /books
9-- > :<|> "books" :> ReqBody Book :> Post Book -- POST /books
10data a :<|> b = a :<|> b
11infixr 8 :<|>