{- This module moves the functionality of the IO monad to class level -} module Io where class Monad m => Io m where io :: IO a -> m a instance Io IO where io = id -- moving IO library to class level: putStrC :: Io m => String -> m () putStrC = io . putStr -- ... to be completed ...