Skip to content

Commit

Permalink
Add Functor instance to AuthHandler. (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
torgeirsh committed Dec 30, 2022
1 parent b8675c0 commit a226009
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.d/1638
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
synopsis: Add Functor instance to AuthHandler.
prs: #1638
3 changes: 2 additions & 1 deletion servant-server/src/Servant/Server/Experimental/Auth.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
Expand Down Expand Up @@ -44,7 +45,7 @@ type family AuthServerData a :: *
-- NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE
newtype AuthHandler r usr = AuthHandler
{ unAuthHandler :: r -> Handler usr }
deriving (Generic, Typeable)
deriving (Functor, Generic, Typeable)

-- | NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE
mkAuthHandler :: (r -> Handler usr) -> AuthHandler r usr
Expand Down

0 comments on commit a226009

Please sign in to comment.