[GUI] Re: Platform-Specific Extensions

Axel Simon A.Simon@ukc.ac.uk
Sun, 27 Apr 2003 14:57:27 +0100


On Sun, Apr 27, 2003 at 02:35:50PM +0100, Alastair Reid wrote:
> 
> Wolfgang Thaller <wolfgang.thaller@gmx.net> writes:
> > Proposal for Platform-Specific extensions:
> > [...]
> > Opinions?
> 
> Sounds like a fine plan.  
> 
> One little detail: what about datatype declarations?
> 
> Suppose the standard version provides a datatype like this:
> 
>   data T = A Int | B Float
> 
> and the foo backend has a third option 'C Char', I can either do:
> 
>   data T = A Int | B Float | C_ext Char
> 

I think this is not a problem at all. As far as my grasp of our task is
concerned, we are just defining an API (CGA). That means we have a bunch
of modules declaring data types, functions and some semantics but these
modules don't do anything. If the user wants to build an application (s)he
has to choose one specific backend (hs-aqua, gtk2hs, HToolkit, etc.) and
link to it (using -package hs-aqua or similar). Then it is no problem to
have data types with more constructors in each backend.

Axel.