X11 libraries

Simon Marlow simonmar@microsoft.com
Wed, 2 Apr 2003 14:48:55 +0100


> > According to the current hierarchy document[1] we have these
> > libraries under Graphics.X11.Xlib.  Perhaps these names would be
> > correct:
>  =20
> >     Graphics.X11.Xlib=20
> >     Graphics.X11.Xlib.Types
> >     Graphics.X11.X1ib.StdDIS
>=20
> > The reason for separating Xlib into its own hierarchy is that there
> > are other APIs under X11 (Xt, Xaw, Xmu). =20
>=20
> That makes sense except that I didn't tell you enough about Types and
> StdDIS.  Types contains generic X11 types (which would be used by Xt,
> Xaw, etc). StdDIS contains generic GreenCard definitions and would
> also be used by Xt, etc.  So I see things developing as follows:
>=20
>      Graphics.X11         -- reexports all children except StdDIS=20
>      Graphics.X11.StdDIS  -- should be shared by all GC'd files
>      Graphics.X11.Types   -- shared by all X11 impls
>      Graphics.X11.Xlib   =20
>      Graphics.X11.Xt =20
>      Graphics.X11.Xaw   =20
>      Graphics.X11.Xmu   =20
>=20
> [StdDIS is just a copy of the file included in GreenCard distributions
> and would go away if we were to do the sensible thing and have a
> single StdDIS somewhere in the libraries tree.]

Ok for Graphics.X11.Types. =20

For StdDIS, if it is shared by all greencard-generated source, then it
probably should be something like Greencard.StdDIS and kept in a
separate greencard package.  For now, putting it in Graphics.X11.StdDIS
(and not advertising its existence) should be fine.

> > Win32 is currently listed as being under System.Win32.  However,
> > since we've just put Dotnet at the top of the hierarchy, and Win32
> > contains a range of both systems and graphics stuff, I'd be happy
> > for it to be at the top of the hierarchy too.
>=20
> I think I'd prefer both to be under System.

For Dotnet at least, there's a whole hierarchy that lives under it that
mirrors the .NET class hierarchy.  System.Dotnet.System.Xml would be a
bit of a mouthful, for example.

But also these libraries don't fall into any single category in the
Haskell hierarchy, so there's no reason we should place them under
System any more than Graphics, for example.  System.Posix is different:
it only deals with system interaction (although the network bits of
System.Posix really live under Network, so it's not a clean break).

> > HGL is assigned Graphics.HGL, which seems like the right thing.
>=20
> Ok, I'll put it there.

Or Graphics.Rendering.HGL as Malcolm suggested (actually this is
probably more accurate).

> > The NHC folks seem to be using their own Makefiles, called
> > Makefile.nhc98.
>=20
> I'll probably do the same.
>=20
> Hmmm, I wonder if the existing scriptMakefile used by Hugs to convert
> and compile the libraries should be moved into libraries/base ?

By all means...

> I gather that the Win32 library is needed for windows version of GHC
> so it's a bit moer of an issue there...

It's distibuted with the Win32 GHC, but isn't needed by it (AFAIK).

Cheers,
	Simon