Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
data a :<|> b infixr 3 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 :}
a :<|> b infixr 3 |
Instances
Bifoldable (:<|>) Source # | |
Bifunctor (:<|>) Source # | |
Bitraversable (:<|>) Source # | |
Defined in Servant.API.Alternative bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a :<|> b) -> f (c :<|> d) # | |
Biapplicative (:<|>) Source # | |
Defined in Servant.API.Alternative | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) Source # | |
Foldable ((:<|>) a) Source # | |
Defined in Servant.API.Alternative fold :: Monoid m => (a :<|> m) -> m # foldMap :: Monoid m => (a0 -> m) -> (a :<|> a0) -> m # foldMap' :: Monoid m => (a0 -> m) -> (a :<|> a0) -> m # foldr :: (a0 -> b -> b) -> b -> (a :<|> a0) -> b # foldr' :: (a0 -> b -> b) -> b -> (a :<|> a0) -> b # foldl :: (b -> a0 -> b) -> b -> (a :<|> a0) -> b # foldl' :: (b -> a0 -> b) -> b -> (a :<|> a0) -> b # foldr1 :: (a0 -> a0 -> a0) -> (a :<|> a0) -> a0 # foldl1 :: (a0 -> a0 -> a0) -> (a :<|> a0) -> a0 # toList :: (a :<|> a0) -> [a0] # length :: (a :<|> a0) -> Int # elem :: Eq a0 => a0 -> (a :<|> a0) -> Bool # maximum :: Ord a0 => (a :<|> a0) -> a0 # minimum :: Ord a0 => (a :<|> a0) -> a0 # | |
Traversable ((:<|>) a) Source # | |
Functor ((:<|>) a) Source # | |
(Monoid a, Monoid b) => Monoid (a :<|> b) Source # | |
(Semigroup a, Semigroup b) => Semigroup (a :<|> b) Source # | |
(Bounded a, Bounded b) => Bounded (a :<|> b) Source # | |
(Show a, Show b) => Show (a :<|> b) Source # | |
(Eq a, Eq b) => Eq (a :<|> b) Source # | |
type MkLink (a :<|> b :: Type) r Source # | |