add a clause to Canonicalize for (a :<|> b) :> c with the obvious definition
This commit is contained in:
parent
6af9b9e70f
commit
6909b54367
2 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,8 @@ import Servant.Utils.Links (HasLink (..), IsElem, IsElem',
|
|||
-- i.e distributing all ':>'-separated bits into the subsequent ':<|>'s.
|
||||
type family Canonicalize api :: * where
|
||||
-- requires UndecidableInstances
|
||||
Canonicalize (a :> (b :<|> c)) = ((a :> Canonicalize b) :<|> (a :> Canonicalize c))
|
||||
Canonicalize (a :> (b :<|> c)) = a :> Canonicalize b :<|> a :> Canonicalize c
|
||||
Canonicalize ((a :<|> b) :> c) = a :> Canonicalize c :<|> b :> Canonicalize c
|
||||
Canonicalize (a :> b) = Redex b (Canonicalize b) a
|
||||
Canonicalize (a :<|> b) = Canonicalize a :<|> Canonicalize b
|
||||
Canonicalize a = a
|
||||
|
|
|
@ -55,6 +55,8 @@ module Servant.API.ContentTypes
|
|||
, AcceptHeader(..)
|
||||
, AllCTRender(..)
|
||||
, AllCTUnrender(..)
|
||||
, AllMimeRender(..)
|
||||
, AllMimeUnrender(..)
|
||||
, FromFormUrlEncoded(..)
|
||||
, ToFormUrlEncoded(..)
|
||||
, IsNonEmpty
|
||||
|
|
Loading…
Reference in a new issue