GUI Library Task Force
Tue, 25 Sep 2001 23:39:08 -0500
"Manuel M. T. Chakravarty" wrote:
> * I am not a big fan of introducing an extra monad (`GUI' in
> this case). It can easily become a pain in programs that
> do a lot of "normal" IO as you have to lift all IO
> functions to GUI.
Shouldn't GUI be a typeclass (as a subclass of Monad), with IO being an
instance of it? This gives the following benefits:
o "Pure" GUI functions can reflect this in their type.
i.e. (GUI g) => g ()
o IO functions can use GUI features directly without lifting.
o "Pure" GUI functions are implicitly usable in the IO monad
They "are" IO functions.