[1 of 1] Compiling Data.Pool ( Data/Pool.hs, dist/dist-sandbox-5e2d4400/build/Data/Pool.o )
Data/Pool.hs:313:26:
Could not deduce (Control.Monad.Trans.Control.StM m (Maybe a0)
~ Control.Monad.Trans.Control.StM m (Maybe b))
from the context (MonadBaseControl IO m)
bound by the type signature for
tryWithResource :: MonadBaseControl IO m =>
Pool a -> (a -> m b) -> m (Maybe b)
at Data/Pool.hs:(300,5)-(304,40)
NB: ‘Control.Monad.Trans.Control.StM’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
Expected type: m (Maybe a0)
-> IO (Control.Monad.Trans.Control.StM m (Maybe b))
Actual type: m (Maybe a0)
-> IO (Control.Monad.Trans.Control.StM m (Maybe a0))
Relevant bindings include
runInIO :: Control.Monad.Trans.Control.RunInBase m IO
(bound at Data/Pool.hs:305:39)
act :: a -> m b (bound at Data/Pool.hs:305:22)
tryWithResource :: Pool a -> (a -> m b) -> m (Maybe b)
(bound at Data/Pool.hs:305:1)
In the second argument of ‘(.)’, namely ‘runInIO’
In the expression: restore . runInIO
[1 of 1] Compiling Data.Pool ( Data/Pool.hs, dist/dist-sandbox-5e2d4400/build/Data/Pool.o )
Data/Pool.hs:313:26: Could not deduce (Control.Monad.Trans.Control.StM m (Maybe a0) ~ Control.Monad.Trans.Control.StM m (Maybe b)) from the context (MonadBaseControl IO m) bound by the type signature for tryWithResource :: MonadBaseControl IO m => Pool a -> (a -> m b) -> m (Maybe b) at Data/Pool.hs:(300,5)-(304,40) NB: ‘Control.Monad.Trans.Control.StM’ is a type function, and may not be injective The type variable ‘a0’ is ambiguous Expected type: m (Maybe a0) -> IO (Control.Monad.Trans.Control.StM m (Maybe b)) Actual type: m (Maybe a0) -> IO (Control.Monad.Trans.Control.StM m (Maybe a0)) Relevant bindings include runInIO :: Control.Monad.Trans.Control.RunInBase m IO (bound at Data/Pool.hs:305:39) act :: a -> m b (bound at Data/Pool.hs:305:22) tryWithResource :: Pool a -> (a -> m b) -> m (Maybe b) (bound at Data/Pool.hs:305:1) In the second argument of ‘(.)’, namely ‘runInIO’ In the expression: restore . runInIO