访问函数不返回 Either Failure a
access function not returning Either Failure a
我在使用 Haskell mongoDB 驱动程序和 access
函数的 return 类型时遇到一些困难。根据 the hackage documentation and the tutorial on the haskell-mongodb github page,access
的类型应该是
MonadIO m => Pipe -> AccessMode -> Database -> Action m a -> m (Either Failure a)
但是,在我的代码中的类型推断中,本地 Hoogle 查询和 the source code 都没有涉及。都是显示类型
MonadIO m => Pipe -> AccessMode -> Database -> Action m a -> m a
我对 Haskell 还是很陌生,所以我犹豫是否要得出文档作者错误的结论,但从我沮丧的角度来看,情况确实如此。
这是monad/kind骗局吗,是我误读了文档,还是文档不正确?
您对版本不匹配感到困惑。版本 1.3.2 on GitHub 在 return 类型中也有 Either
。
我在使用 Haskell mongoDB 驱动程序和 access
函数的 return 类型时遇到一些困难。根据 the hackage documentation and the tutorial on the haskell-mongodb github page,access
的类型应该是
MonadIO m => Pipe -> AccessMode -> Database -> Action m a -> m (Either Failure a)
但是,在我的代码中的类型推断中,本地 Hoogle 查询和 the source code 都没有涉及。都是显示类型
MonadIO m => Pipe -> AccessMode -> Database -> Action m a -> m a
我对 Haskell 还是很陌生,所以我犹豫是否要得出文档作者错误的结论,但从我沮丧的角度来看,情况确实如此。
这是monad/kind骗局吗,是我误读了文档,还是文档不正确?
您对版本不匹配感到困惑。版本 1.3.2 on GitHub 在 return 类型中也有 Either
。