Safe Haskell | Safe |
---|---|
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
Functor ((:<|>) a) Source # | |
Foldable ((:<|>) a) Source # | |
Defined in Servant.API.Alternative fold :: Monoid m => (a :<|> m) -> 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 # | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: *) Source # | |
(Bounded a, Bounded b) => Bounded (a :<|> b) Source # | |
(Eq a, Eq b) => Eq (a :<|> b) Source # | |
(Show a, Show b) => Show (a :<|> b) Source # | |
(Semigroup a, Semigroup b) => Semigroup (a :<|> b) Source # | |
(Monoid a, Monoid b) => Monoid (a :<|> b) Source # | |
(Enter typ1 m1 n1 ret1, Enter typ2 m2 n2 ret2, m1 ~ m2, n1 ~ n2, Entered m1 n1 (typ1 :<|> typ2) ~ (ret1 :<|> ret2), Entered n1 m1 (ret1 :<|> ret2) ~ (typ1 :<|> typ2)) => Enter (typ1 :<|> typ2) m1 n1 (ret1 :<|> ret2) Source # | |
type MkLink (a :<|> b :: *) r Source # | |