Skip to content

Commit

Permalink
Add add set cookies instance (#1702)
Browse files Browse the repository at this point in the history
* Add AddSetCookies instance for when the left tree is the same before and after the transformation

* Added changelog

* Updated the changelog
  • Loading branch information
ohri-anurag committed Aug 22, 2023
1 parent 809ca37 commit ca6944b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog.d/1702
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
synopsis: Add AddSetCookies instance for when the left tree is the same before and after the transformation.
prs: #1702
issues: #1601
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ instance {-# OVERLAPS #-}
=> AddSetCookies ('S n) (a :<|> b) (a' :<|> b') where
addSetCookies cookies (a :<|> b) = addSetCookies cookies a :<|> addSetCookies cookies b

instance {-# OVERLAPPING #-}
(AddSetCookies ('S n) a a, AddSetCookies ('S n) b b')
=> AddSetCookies ('S n) (a :<|> b) (a :<|> b') where
addSetCookies cookies ( a :<|> b) = addSetCookies cookies a :<|> addSetCookies cookies b

instance {-# OVERLAPS #-}
( AddSetCookies ('S n) (ServerT (ToServantApi api) m) cookiedApi
, Generic (api (AsServerT m))
Expand Down

0 comments on commit ca6944b

Please sign in to comment.