git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update modules.rst
2845b98Phil Freeman
docs/source/modules.rst+10
@@ -33,6 +33,16 @@ Values, type constructors and data constructors can all be explicitly imported.
33 module B where
33 module B where
34
34
35 import A (runFoo, Foo(..), Bar(Bar))
35 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.
36
46
37Module Exports
47Module Exports
38--------------
48--------------