我有以下带有管道的代码,没有第二个管道(>-> P.mapM ( fillMD5)
)就可以了。fillMD5
是一个操作a -> IO a
。
runSafeT $ runEffect $
every (senseRecursive5 startfpo)
>-> P.mapM ( fillMD5)
>-> P.map fp2rdf
>-> toNTriple houtfile
错误是:
Couldn't match type `IO' with `Pipes.Safe.SafeT IO'
Expected type: Pipes.Safe.SafeT IO ()
Actual type: IO ()
In the second argument of `($)', namely
`runEffect
我知道类型mapM
是
mapM :: Monad m => (a -> m b) -> Pipe a b m r
但我看不出这个怎么解除Safe.SafeT
?