Skip to content

Commit ca6944b

Browse files
authored
Add add set cookies instance (#1702)
* Add AddSetCookies instance for when the left tree is the same before and after the transformation * Added changelog * Updated the changelog
1 parent 809ca37 commit ca6944b

File tree

2 files changed

+8
-0
lines changed
  • changelog.d
  • servant-auth/servant-auth-server/src/Servant/Auth/Server/Internal

2 files changed

+8
-0
lines changed

changelog.d/1702

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
synopsis: Add AddSetCookies instance for when the left tree is the same before and after the transformation.
2+
prs: #1702
3+
issues: #1601

servant-auth/servant-auth-server/src/Servant/Auth/Server/Internal/AddSetCookie.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ instance {-# OVERLAPS #-}
8686
=> AddSetCookies ('S n) (a :<|> b) (a' :<|> b') where
8787
addSetCookies cookies (a :<|> b) = addSetCookies cookies a :<|> addSetCookies cookies b
8888

89+
instance {-# OVERLAPPING #-}
90+
(AddSetCookies ('S n) a a, AddSetCookies ('S n) b b')
91+
=> AddSetCookies ('S n) (a :<|> b) (a :<|> b') where
92+
addSetCookies cookies ( a :<|> b) = addSetCookies cookies a :<|> addSetCookies cookies b
93+
8994
instance {-# OVERLAPS #-}
9095
( AddSetCookies ('S n) (ServerT (ToServantApi api) m) cookiedApi
9196
, Generic (api (AsServerT m))

0 commit comments

Comments
 (0)