[Haskell-cafe] Hierarchical Library

Wolfgang Jeltsch wolfgang at jeltsch.net
Sat Apr 24 11:40:29 EDT 2004


Am Samstag, 24. April 2004 09:23 schrieb haskell at alias.spaceandtime.org:
> Hello,
>
> Why does this fail?
>
> ==========================
> import System.Posix
>
> test = Temp.mkstemp
> ==========================
>
> Are the libraries hierarchical in name only?
>
> Thanks,
>
> James

Use
    import System.Posix.Temp
    test = mkstemp
instead.

The hierarchical module system was a later addition to the Haskell 98 standard 
which was designed to not cause modifications of large parts of the standard 
but only minor changes instead.

The hierarchical module system just allows the dot (".") to be part of module 
identifiers.  The hierarchy of the modules is reflected in the directory 
structure of the source code (and I think that this is already not demanded 
by the specification).  Nothing more, AFAIK.

Wolfgang



More information about the Haskell-Cafe mailing list