Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Union of two APIs, first takes precedence in case of overlap.
Example:
type MyApi = "books" :> Get [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post Book -- POST /books
a :<|> b infixr 8 |
(HasServer a, HasServer b) => HasServer ((:<|>) a b) | A server for type MyApi = "books" :> Get [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post Book -- POST /books server :: Server MyApi server = listAllBooks :<|> postBook where listAllBooks = ... postBook book = ... |
type Server ((:<|>) a b) = (:<|>) (Server a) (Server b) |