Qustions about hierarchaly library conventions
Thu, 5 Jun 2003 09:31:26 +0100
> I have a qustion about a convention when writing a hierarchal library.
> Lets say I have a library
> with modules
> Is there a convention (official or not) as to when there is a parent
> module (in the example above, C.hs) that imports and re-exports the
> various sub-modules?
There are some suggestions here (see "Module naming conventions"):
Further ideas for fleshing this out are welcome.
> For example, in the standard libraries, there is a Foreign module that
> re-exports most of Foreign.*. But there isn't a=20
> System.Posix; you have
> to import the System.Posix.Signal and System.Posix.Types individually.
There is a System.Posix. It's in the 'unix' package, but you don't have
to say anything to get it:
Prelude> System.Posix.epochTime >>=3D print
Loading package unix ... linking ... done.
Having the documentation separated into packages is perhaps the
confusing thing here - System.Posix.Signals and System.Posix.Types are
in the base package, whereas the rest of System.Posix is in the unix