> class StreamMonad m where > fetchLine = m > sendLine = String -> m () > > instance StreamMonad IO where > fetchLine = getLine > sendLine = putLine > > fetchLineFromStream = lift fetchLine > sendLineToStream = lift . sendLine
This approach makes more sense to me. The equivalent to printing something to the screen in the Net (IRC) monad is privmsg and it is easy to make that connection using type classes. I don't see how to make this connection using MonadIO. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
