X11 libraries

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Wed, 2 Apr 2003 12:11:10 +0100


Alastair Reid <alastair@reid-consulting-uk.ltd.uk> writes:

> At present, I'm modelling my infrastructure (Makefiles, directory
> structure, etc) on the HOpenGL infrastructure so, naturally, I'm
> putting it in fptools/libraries/X11 and have the following modules:
> 
>   module X11   -- reexports  X11.Types and X11.Xlib
>   module X11.StdDIS
>   module X11.Types
>   module X11.Xlib
> 
> 1) Is this the right place to put X11 in the directory tree or should
>    I put it under libraries/base or some other existing directory?

Yes, I'm sure your current location is fine.  Presumably it will appear
as a ghc/nhc98 "package", just like HOpenGL, HaXml, etc.

> 2) Is this the right place to put the X11 module in the hierarchial
>    namespace?

Probably not.  HOpenGL uses a
    Graphics.Rendering.OpenGL
prefix, whilst GLUT uses
    Graphics.UI.GLUT
and these accurately reflect the nature of the libraries.  I don't
know exactly what your X11 library provides, but assuming that it has
a mix of rendering and user interface capabilities, I would guess that
    Graphics.X11
might be an OK location?  On the other hand, HGL would probably fit
better into
    Graphics.Rendering.HGL
since it is mostly concerned with drawing, yes?  As for your Win32
library, again I don't know exactly what capabilities it provides.
If it is mainly a mixture of graphical things, then
    Graphics.Win32
would be right, but if it is wider in scope, such as perhaps interfacing
to the entire win32 DLL, then
    System.Win32
would seem more appropriate.

Regards,
    Malcolm