
16 Sep
2013
16 Sep
'13
5 a.m.
Hi, I'm trying to understand the MonadWriter class definition syntax. Now, I'm using GHC 7.6 and the class is defined as class (Monoid w, Monad m) => MonadWriter w m | m -> w where .... I've never seen '|' in the middle of a class definition, could some one explain this? It's used in the guard syntax as well as to separate data constructors in a type definition. Regards Vinay