
Hello, I am working with some somewhat legacy code. I understand what "import qualified Blah as B" means but what does "import qualified Blah" mean? Is this a deprecated feature? I saw with user defined module as well as with "import qualified System" for example. REgards, Vasili

Vasili I. Galchin wrote:
Hello,
I am working with some somewhat legacy code. I understand what "import qualified Blah as B" means but what does "import qualified Blah" mean? Is this a deprecated feature? I saw with user defined module as well as with "import qualified System" for example.
It just means that you must qualify the names with the module name (System). It's not deprecated, but most folks use the "import qualified ... as" version instead so that they can give a shorter name instead of using the full module name. -- Live well, ~wren

On Sat, May 23, 2009 at 12:39 AM, Vasili I. Galchin
Hello,
I am working with some somewhat legacy code. I understand what "import qualified Blah as B" means but what does "import qualified Blah" mean? Is this a deprecated feature? I saw with user defined module as well as with "import qualified System" for example.
REgards,
Vasili
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
See the report, section 5.3.2: http://www.haskell.org/onlinereport/modules.html Because we tend to have long names now, you will often see people aliasing. But "qualified" by itself has an important role, it's not deprecated. Paulo

Hi Paulo,
You are teasing me ;^) So what is the "semantics" of "import qualified
Blah"?
Regards,
Vasili
On Sat, May 23, 2009 at 12:47 AM, Paulo Tanimoto
On Sat, May 23, 2009 at 12:39 AM, Vasili I. Galchin
wrote: Hello,
I am working with some somewhat legacy code. I understand what "import qualified Blah as B" means but what does "import qualified Blah" mean? Is this a deprecated feature? I saw with user defined module as well as with "import qualified System" for example.
REgards,
Vasili
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
See the report, section 5.3.2: http://www.haskell.org/onlinereport/modules.html
Because we tend to have long names now, you will often see people aliasing. But "qualified" by itself has an important role, it's not deprecated.
Paulo

Am Samstag 23 Mai 2009 08:08:42 schrieb Vasili I. Galchin:
Hi Paulo,
You are teasing me ;^) So what is the "semantics" of "import qualified Blah"?
Regards,
Vasili
The qualified names (Blah.foo, Blah.baz) are in scope, but not the unqualified names foo, baz. If you import qualified Bing.Bong.Blah.Blub as Blub the names of Blub are in scope in the fully qualified form Bing.Bong.Blah.Blub.foo and the shorter Blub.foo without the 'as Blub', only the fully qualified form is in scope.
participants (4)
-
Daniel Fischer
-
Paulo Tanimoto
-
Vasili I. Galchin
-
wren ng thornton