Galchin, Vasili | 2 Dec 09:46

import

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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Luke Palmer | 2 Dec 10:59

Re: import

2008/12/2 Galchin, Vasili <vigalchin <at> gmail.com>:
> 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
Bulat Ziganshin | 2 Dec 10:45

Re: import

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 <at> gmail.com
Galchin, Vasili | 2 Dec 12:08

Re: import

specifically I am concerned about ByteString and underlying nodes .. ???



On Tue, Dec 2, 2008 at 3:45 AM, Bulat Ziganshin <bulat.ziganshin <at> gmail.com> 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 <at> gmail.com


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Bulat Ziganshin | 2 Dec 12:22

Re[2]: import

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
> <bulat.ziganshin <at> gmail.com> 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 <at> gmail.com
>  
>  

>   

--

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin <at> gmail.com

Gmane