Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
class (Monoid w, Monad m) => MonadWriter w m | m -> w where pass :: m (a,w -> w) -> m a listen :: m a -> m (a,w) tell :: w -> m ()
上面的管道是什么意思?片段来自这里。
实际上,它是一种“功能依赖”。在这种情况下,这意味着m唯一标识w——类型m决定类型w。(这可能是一个更好的链接。)
m
w