Add Functor instance to AuthHandler. (#1638)
This commit is contained in:
parent
b8675c0924
commit
a22600979a
2 changed files with 4 additions and 1 deletions
2
changelog.d/1638
Normal file
2
changelog.d/1638
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
synopsis: Add Functor instance to AuthHandler.
|
||||||
|
prs: #1638
|
|
@ -1,5 +1,6 @@
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
|
{-# LANGUAGE DeriveFunctor #-}
|
||||||
{-# LANGUAGE DeriveGeneric #-}
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE FlexibleInstances #-}
|
{-# LANGUAGE FlexibleInstances #-}
|
||||||
|
@ -44,7 +45,7 @@ type family AuthServerData a :: *
|
||||||
-- NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE
|
-- NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE
|
||||||
newtype AuthHandler r usr = AuthHandler
|
newtype AuthHandler r usr = AuthHandler
|
||||||
{ unAuthHandler :: r -> Handler usr }
|
{ unAuthHandler :: r -> Handler usr }
|
||||||
deriving (Generic, Typeable)
|
deriving (Functor, Generic, Typeable)
|
||||||
|
|
||||||
-- | NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE
|
-- | NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE
|
||||||
mkAuthHandler :: (r -> Handler usr) -> AuthHandler r usr
|
mkAuthHandler :: (r -> Handler usr) -> AuthHandler r usr
|
||||||
|
|
Loading…
Reference in a new issue