Pipe and typeclasses

Hello, I have seen from time to time the pipe symbol in type signatures, like so: class Monad m => MonadReader r m | m -> r where How should I interpret that ? Or more to the point, how does the compiler interpret it? Thanks, Emm

2013/7/23 Emmanuel Surleau
Hello,
I have seen from time to time the pipe symbol in type signatures, like so:
class Monad m => MonadReader r m | m -> r where
How should I interpret that ? Or more to the point, how does the compiler interpret it?
Hi Emmanuel! The pipe symbol is for a functional dependency: http://www.haskell.org/haskellwiki/Functional_dependencies Karol

Thanks! Actually, I read about them some time ago (last year?) but prompty
forgot again, it looks like.
On Tue, Jul 23, 2013 at 9:56 PM, Karol Samborski
2013/7/23 Emmanuel Surleau
Hello,
I have seen from time to time the pipe symbol in type signatures, like so:
class Monad m => MonadReader r m | m -> r where
How should I interpret that ? Or more to the point, how does the compiler interpret it?
Hi Emmanuel!
The pipe symbol is for a functional dependency: http://www.haskell.org/haskellwiki/Functional_dependencies
Thanks Karol! I actually read about the concept some months ago, but apparently forgot about it again. Cheers, Emm
participants (2)
-
Emmanuel Surleau
-
Karol Samborski