[GUI] State, Attributes and Some basic widgets

Glynn Clements glynn.clements@virgin.net
Wed, 16 Apr 2003 14:14:31 +0100


Axel Simon wrote:

> I see three strands of modelling widget hierarchies in Haskell:
> 
> 1.) Don't. Each widget has an individual type, unconnected to the other 
> widgets. (Glynn's ponit of view, if I am not mistaken)

No; my view is *not* to have distinct Haskell types for each widget
class. I should be able to replace any widget by a "compatible" widget
(e.g. a subclass) without having to change all of the code which uses
that widget.

Either have a single generic Widget type (with type checks deferred to
run time), or use type classes.

-- 
Glynn Clements <glynn.clements@virgin.net>