
Hello, I am a little uncertain about "import" semantics in a hierarchical package ... i.e. if I import the root of a package root do I get everything under the "root's" namespace, i.e. the namespace tree? thanks, vasili

Hello Vasili, Tuesday, December 2, 2008, 11:48:40 AM, you wrote:
I am a little uncertain about "import" semantics in a hierarchical package ... i.e. if I import the root of a package root do I get everything under the "root's" namespace, i.e. the namespace tree?
no. you import just *module*, and it gives you just the identifiers exported by module (by default - all symbols *defined* in this module) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

specifically I am concerned about ByteString and underlying nodes .. ???
On Tue, Dec 2, 2008 at 3:45 AM, Bulat Ziganshin
Hello Vasili,
Tuesday, December 2, 2008, 11:48:40 AM, you wrote:
I am a little uncertain about "import" semantics in a hierarchical package ... i.e. if I import the root of a package root do I get everything under the "root's" namespace, i.e. the namespace
tree?
no. you import just *module*, and it gives you just the identifiers exported by module (by default - all symbols *defined* in this module)
-- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Hello Vasili, Tuesday, December 2, 2008, 2:08:03 PM, you wrote: it's just convention to make modules like this: module System.Stream ( module System.Stream.Class, module System.Stream.Transformer, module System.Stream.Instance, module System.Stream.Utils, ) where import System.Stream.Class import System.Stream.Transformer import System.Stream.Instance import System.Stream.Utils
specifically I am concerned about ByteString and underlying nodes .. ???
On Tue, Dec 2, 2008 at 3:45 AM, Bulat Ziganshin
wrote: Hello Vasili,
Tuesday, December 2, 2008, 11:48:40 AM, you wrote:
I am a little uncertain about "import" semantics in a hierarchical package ... i.e. if I import the root of a package root do I get everything under the "root's" namespace, i.e. the namespace tree?
no. you import just *module*, and it gives you just the identifiers exported by module (by default - all symbols *defined* in this module)
-- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
-- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

2008/12/2 Galchin, Vasili
Hello,
I am a little uncertain about "import" semantics in a hierarchical package ... i.e. if I import the root of a package root do I get everything under the "root's" namespace, i.e. the namespace tree?
There is nothing at all magical about the . in a package name, other than that it is replaced by a / when searching for modules in a directory tree. But you should treat it as any other identifier character. Any hierarchy is purely incidental :-) Luke
participants (3)
-
Bulat Ziganshin
-
Galchin, Vasili
-
Luke Palmer