on master help sign in
More instances for Alternative
f14d227Julian K. Arni
servant/src/Servant/API/Alternative.hs+3−1
@@ -1,5 +1,7 @@
1{-# LANGUAGE CPP #-}
1{-# LANGUAGE CPP #-}
2{-# LANGUAGE DeriveDataTypeable #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveFunctor #-}
4+{-# LANGUAGE DeriveTraversable #-}
3{-# LANGUAGE TypeOperators #-}
5{-# LANGUAGE TypeOperators #-}
4{-# OPTIONS_HADDOCK not-home #-}
6{-# OPTIONS_HADDOCK not-home #-}
5module Servant.API.Alternative ((:<|>)(..)) where
7module Servant.API.Alternative ((:<|>)(..)) where
@@ -17,7 +19,7 @@ import Data.Typeable (Typeable)
17-- :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] () -- POST /books
19-- :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] () -- POST /books
18-- :}
20-- :}
19data a :<|> b = a :<|> b
21data a :<|> b = a :<|> b
20− deriving (Typeable, Eq, Show)
22+ deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded)
21infixr 8 :<|>
23infixr 8 :<|>
22
24
23instance (Monoid a, Monoid b) => Monoid (a :<|> b) where
25instance (Monoid a, Monoid b) => Monoid (a :<|> b) where