mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-02-01 13:50:26 +01:00
13 lines
333 B
Haskell
13 lines
333 B
Haskell
{-# OPTIONS_GHC -Wno-orphans #-}
|
|
|
|
module UnliftIO.Except
|
|
() where
|
|
|
|
import Control.Monad.Except
|
|
import UnliftIO
|
|
|
|
instance (MonadUnliftIO m, Exception e) => MonadUnliftIO (ExceptT e m) where
|
|
withRunInIO exceptToIO = ExceptT $ try $ do
|
|
withRunInIO $ \runInIO ->
|
|
exceptToIO (runInIO . (either throwIO pure <=< runExceptT))
|