Fix build with persistent-2.12.0.1
persistent stopped using askLogFunc, and the thing to use is askLoggerIO from monad-logger. Bumped the dep to the first version that contained that. Note that the i386ancient build uses a newer monad-logger than 0.3.10, so the new versioned dep should not break it, and presumably nothing else either. This commit was sponsored by Noam Kremen on Patreon.
This commit is contained in:
parent
4dde355c79
commit
8868a3a4c7
5 changed files with 26 additions and 4 deletions
|
@ -26,7 +26,7 @@ import qualified Database.Sqlite as Sqlite
|
|||
import Control.Monad
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Control.Monad.IO.Unlift (MonadUnliftIO, withRunInIO)
|
||||
import Control.Monad.Logger (MonadLogger)
|
||||
import Control.Monad.Logger (MonadLoggerIO, askLoggerIO)
|
||||
import Control.Concurrent
|
||||
import Control.Concurrent.Async
|
||||
import Control.Exception (throwIO, BlockedIndefinitelyOnMVar(..))
|
||||
|
@ -245,7 +245,7 @@ runSqliteRobustly tablename db a = do
|
|||
-- Like withSqlConn, but more robust.
|
||||
withSqlConnRobustly
|
||||
:: (MonadUnliftIO m
|
||||
, MonadLogger m
|
||||
, MonadLoggerIO m
|
||||
, IsPersistBackend backend
|
||||
, BaseBackend backend ~ SqlBackend
|
||||
, BackendCompatible SqlBackend backend
|
||||
|
@ -254,7 +254,7 @@ withSqlConnRobustly
|
|||
-> (backend -> m a)
|
||||
-> m a
|
||||
withSqlConnRobustly open f = do
|
||||
logFunc <- askLogFunc
|
||||
logFunc <- askLoggerIO
|
||||
withRunInIO $ \run -> bracket
|
||||
(open logFunc)
|
||||
closeRobustly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue