Reformatting + clarification comment
This commit is contained in:
parent
04ba7e7a6b
commit
b84095ee5a
1 changed files with 5 additions and 1 deletions
|
@ -183,7 +183,11 @@ instance (AddHeader h v old new) => AddHeader h v (Union '[old]) (Union '[new])
|
||||||
SOP.Z $ SOP.I $ addOptionalHeader hdr $ SOP.unI $ SOP.unZ $ resp
|
SOP.Z $ SOP.I $ addOptionalHeader hdr $ SOP.unI $ SOP.unZ $ resp
|
||||||
|
|
||||||
instance
|
instance
|
||||||
(AddHeader h v old new, AddHeader h v (Union oldrest) (Union newrest), oldrest ~ (a ': as), newrest ~ (b ': bs))
|
( AddHeader h v old new, AddHeader h v (Union oldrest) (Union newrest)
|
||||||
|
-- This ensures that the remainder of the response list is _not_ empty
|
||||||
|
-- It is necessary to prevent the two instances for union types from
|
||||||
|
-- overlapping.
|
||||||
|
, oldrest ~ (a ': as), newrest ~ (b ': bs))
|
||||||
=> AddHeader h v (Union (old ': (a ': as))) (Union (new ': (b ': bs))) where
|
=> AddHeader h v (Union (old ': (a ': as))) (Union (new ': (b ': bs))) where
|
||||||
addOptionalHeader hdr resp = case resp of
|
addOptionalHeader hdr resp = case resp of
|
||||||
SOP.Z (SOP.I rHead) -> SOP.Z $ SOP.I $ addOptionalHeader hdr rHead
|
SOP.Z (SOP.I rHead) -> SOP.Z $ SOP.I $ addOptionalHeader hdr rHead
|
||||||
|
|
Loading…
Reference in a new issue