Reputation: 15673
According to the documentation there is a MonadIO
instance for ConduitM if the underlying Monad has a MonadIO
instance (MonadIO m => MonadIO (ConduitM i o m)
).
Why then does this:
yield (1::Int) $$ await >>= (liftIO.print) :: IO ()
fail with this:
No instance for (MonadIO (ConduitM Int Data.Void.Void IO)) arising from a use of ‘liftIO’ In the first argument of ‘(.)’, namely ‘liftIO’ In the second argument of ‘(>>=)’, namely ‘(liftIO . print)’ In the second argument of ‘($$)’, namely ‘await >>= (liftIO . print)’
What am I missing here?
Just checked, apparently I have both transformers 0.22 and transformers 0.3, that might be the cause.
Upvotes: 0
Views: 259
Reputation: 15673
The problem was that conduit depends on transformers-0.2.2.1 (for some reason) and I had both that and transformers-0.3.0.0 - hiding transformers-0.3.0.0 fixed this for now (if I had used cabal it probably would've worked too). In effect, this was the same problem as here.
Upvotes: 2