Combining IO and state monads

Graham Klyne GK@ninebynine.org
Fri, 16 May 2003 14:51:19 +0100


This may be a very dumb question, but...

I've been digging around Monad transformers, trying to get the feel of how 
to use them.  In part, I'm referring to the library source code, and come 
across the following in Control.Monad.State, which I'm having trouble 
figuring out:

[[
-- MonadState class
--
--  get: returns the state from the internals of the monad.
--  put: changes (replaces) the state inside the monad.

class (Monad m) => MonadState s m | m -> s where
         get :: m s
         put :: s -> m ()
]]

What does the vertical bar "|" in the class declaration mean?  I can't find 
this use mentioned in the Haskell report or the GHC type system extensions.

#g


-------------------
Graham Klyne
<GK@NineByNine.org>
PGP: 0FAA 69FF C083 000B A2E9  A131 01B9 1C7A DBCA CB5E