根据文档MonadIO
,如果底层 Monad 有一个MonadIO
实例 ( MonadIO m => MonadIO (ConduitM i o m)
) ,则有一个ConduitM 实例。
那为什么会这样:
yield (1::Int) $$ await >>= (liftIO.print) :: IO ()
失败:
(MonadIO (ConduitM Int Data.Void.Void IO)) 没有使用 'liftIO' 产生的实例 在 '(.)' 的第一个参数中,即 'liftIO' 在 '(>>=) 的第二个参数中',即'(liftIO . print)' 在'($$)'的第二个参数中,即'await >>= (liftIO . print)'</p>
我在这里想念什么?
刚刚检查过,显然我有变压器 0.22 和变压器 0.3,这可能是原因。