
Hello, Why does this fail? ========================== import System.Posix test = Temp.mkstemp ========================== Are the libraries hierarchical in name only? Thanks, James

Am Samstag, 24. April 2004 09:23 schrieb haskell@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

Am Samstag, 24. April 2004 10:40 schrieb Wolfgang Jeltsch:
[...]
Use import System.Posix.Temp test = mkstemp instead.
By the way, you can also use import System.Posix.Temp test = System.Posix.Temp.mkstemp or import System.Posix.Temp as Temp mkstemp = Temp.mkstemp or import System.Posix.Temp as PosixTemp mkstemp = PosixTemp.mkstemp. So you *can* qualify function names but the module name you qualify the function name with must be a name mentioned after "import" or after "as", respectively.
[...]
Wolfgang
participants (2)
-
haskell@alias.spaceandtime.org
-
Wolfgang Jeltsch