Lower Sub and Alternative infix precedence to 4 and 3 respectively
This commit is contained in:
parent
cc13d62c8c
commit
505ca457cc
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ import Prelude.Compat
|
||||||
-- :}
|
-- :}
|
||||||
data a :<|> b = a :<|> b
|
data a :<|> b = a :<|> b
|
||||||
deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded)
|
deriving (Typeable, Eq, Show, Functor, Traversable, Foldable, Bounded)
|
||||||
infixr 8 :<|>
|
infixr 3 :<|>
|
||||||
|
|
||||||
instance (Semigroup a, Semigroup b) => Semigroup (a :<|> b) where
|
instance (Semigroup a, Semigroup b) => Semigroup (a :<|> b) where
|
||||||
(a :<|> b) <> (a' :<|> b') = (a <> a') :<|> (b <> b')
|
(a :<|> b) <> (a' :<|> b') = (a <> a') :<|> (b <> b')
|
||||||
|
|
|
@ -16,7 +16,7 @@ import Data.Typeable (Typeable)
|
||||||
-- >>> type MyApi = "hello" :> "world" :> Get '[JSON] World
|
-- >>> type MyApi = "hello" :> "world" :> Get '[JSON] World
|
||||||
data (path :: k) :> a
|
data (path :: k) :> a
|
||||||
deriving (Typeable)
|
deriving (Typeable)
|
||||||
infixr 9 :>
|
infixr 4 :>
|
||||||
|
|
||||||
-- $setup
|
-- $setup
|
||||||
-- >>> import Servant.API
|
-- >>> import Servant.API
|
||||||
|
|
Loading…
Reference in a new issue