最佳答案
docs page you linked EitherT
清楚地表明 EitherT
是一个类型别名:
type EitherT =
ExceptT
Type alias for ExceptT
这意味着它不能有自己的实例;它拥有的任何实例都将被定义为它是别名的类型for;在这种情况下 ExceptT
。
方便的是,它还链接到 ExceptT
的文档。不方便的是,它将这两次 ExceptT
链接到不同的 URL!其中一个似乎是断开的链接(到 mtl
中存在的模块,就好像它存在于 transformers-either
包中一样),但另一个有效,并显示:
(Functor m, Monad m) => Applicative (ExceptT e m)
关于haskell - `EitherT` 的 Applicative 实例在哪里定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73604547/