git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update modules.rst
commit2845b98e36d1433aac1513cc6f041d5d80848989 authorPhil Freeman <paf31@cantab.net> dateSat 12 Apr 2014, 14:16 (13 years ago) parent32532d8
1 file changed+10
docs/source/modules.rst+10
docs/source/modules.rst+10
@@ -33,6 +33,16 @@ Values, type constructors and data constructors can all be explicitly imported.
3333 module B where
3434
3535 import A (runFoo, Foo(..), Bar(Bar))
36+
37+Modules can also be imported `qualified`, which means that their names will not be brought directly into scope, but rather, aliased to a different module name. This can be helpful when avoiding naming conflicts::
38+
39+ module Main where
40+
41+ import qualified Data.Array as A
42+
43+ null = ...
44+
45+Here, the name ``null`` would ordinarily conflict with ``null`` from ``Data.Array``, but the qualified import solves this problem. ``Data.Array.null`` can be referenced using ``A.null`` instead.
3646
3747Module Exports
3848--------------