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