HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleservant-0.20.3.0Haskell2010

Servant.API.Alternative

  • 1 type
  • Packageservant-0.20.3.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceAlternative.hs
datadata (:<|>) a b
#

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

Example:

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

Constructors

Instances14Bifoldable, Bifunctor, Bitraversable, Biapplicative, HasLink, Functor, …