Commit 633d59ae authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Add MonadLog instance for MaybeT



.. so that it's possible to use logging operations there.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 794c3863
...@@ -57,6 +57,7 @@ import Control.Monad.Reader ...@@ -57,6 +57,7 @@ import Control.Monad.Reader
import qualified Control.Monad.RWS.Strict as RWSS import qualified Control.Monad.RWS.Strict as RWSS
import qualified Control.Monad.State.Strict as SS import qualified Control.Monad.State.Strict as SS
import Control.Monad.Trans.Identity import Control.Monad.Trans.Identity
import Control.Monad.Trans.Maybe
import Data.Monoid import Data.Monoid
import System.Log.Logger import System.Log.Logger
import System.Log.Handler.Simple import System.Log.Handler.Simple
...@@ -146,6 +147,9 @@ instance MonadLog IO where ...@@ -146,6 +147,9 @@ instance MonadLog IO where
instance (MonadLog m) => MonadLog (IdentityT m) where instance (MonadLog m) => MonadLog (IdentityT m) where
logAt p = lift . logAt p logAt p = lift . logAt p
instance (MonadLog m) => MonadLog (MaybeT m) where
logAt p = lift . logAt p
instance (MonadLog m) => MonadLog (ReaderT r m) where instance (MonadLog m) => MonadLog (ReaderT r m) where
logAt p = lift . logAt p logAt p = lift . logAt p
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment