This tutorial is not updated to the last version of gtk2hs, or,
better, it doesn't use the new names for widget events and
doesn't handle then using EventM. ('onExpose', for instance, is
deprecated in current gtk2hs.)
I guess you installed the latest version in Windows, and
that's why you have an error, since eventSent is something
different in version 0.10. Your linux install is probably
not the latest gtk2hs.
> How can I solve the problem and, more importantly, is it possible to
> write portable code with Gtk2Hs/Cairo ?
Develop your applications in the latest version for all
platforms. Try to install gtk2hs as user if you want, by
downloading gtk2hs source code and using: