[Haskell-cafe] Syntax question: class (Monad m) => MonadReader r m | m -> r where

2008-11-02 Thread Mauricio

Hi,

I've reading Control.Monad.Reader source code and
arrived here:

class (Monad m) => MonadReader r m | m -> r where

I can't understand that syntax. Since this is not a
'data' line, what is the '|' supposed mean?

Thanks,
MaurĂ­cio

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Syntax question: class (Monad m) => MonadReader r m | m -> r where

2008-11-02 Thread Andrew Coppin

Mauricio wrote:

Hi,

I've reading Control.Monad.Reader source code and
arrived here:

class (Monad m) => MonadReader r m | m -> r where

I can't understand that syntax. Since this is not a
'data' line, what is the '|' supposed mean?


It's called a "functional dependency". This is not part of the 
Haskell-98 language standard; check the GHC manual.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe