- <para>The reason for this unfortunate distinction is boring: for
- a compiled module when the source isn't available, the compiler
- has no way of knowing what was in scope when the module was
- compiled (and we don't store this information in the interface
- file). However, in practice it shouldn't be a problem: if you
- want both <literal>Time</literal> and <literal>Prelude</literal>
- in scope at the same time, just create a file containing the
- line <literal>import Time</literal> and load it into
- GHCi.</para>
-
- <para>To make life slightly easier, the GHCi prompt also behaves
- as if there is an implicit <literal>import qualified</literal>
- declaration for every module in every package, and every module
- currently loaded into GHCi. So in the above example where the
- <literal>Prelude</literal> was invisible, we can always get at
- <literal>Prelude</literal> identifiers by qualifying them, eg.
- <literal>Prelude.map</literal>.</para>
+ <para>Using the <literal>+</literal> form of the
+ <literal>module</literal> commands adds modules to the current
+ scope, and <literal>-</literal> removes them. Without either
+ <literal>+</literal> or <literal>-</literal>, the current scope
+ is replaced by the set of modules specified. Note that if you
+ use this form and leave out <literal>Prelude</literal>, GHCi
+ will assume that you really wanted the
+ <literal>Prelude</literal> and add it in for you (if you don't
+ want the <literal>Prelude</literal>, then ask to remove it with
+ <literal>:m -Prelude</literal>).</para>
+
+ <para>The scope is automatically set after a
+ <literal>:load</literal> command, to the most recently loaded
+ "target" module, in a <literal>*</literal>-form if possible.
+ For example, if you say <literal>:load foo.hs bar.hs</literal>
+ and <filename>bar.hs</filename> contains module
+ <literal>Bar</literal>, then the scope will be set to
+ <literal>*Bar</literal> if <literal>Bar</literal> is
+ interpreted, or if <literal>Bar</literal> is compiled it will be
+ set to <literal>Prelude,Bar</literal> (GHCi automatically adds
+ <literal>Prelude</literal> if it isn't present and there aren't
+ any <literal>*</literal>-form modules).</para>
+
+ <para>With multiple modules in scope, especially multiple
+ <literal>*</literal>-form modules, it is likely that name
+ clashes will occur. Haskell specifies that name clashes are
+ only reported when an ambiguous identifier is used, and GHCi
+ behaves in the same way for expressions typed at the
+ prompt.</para>
+
+ <sect3>
+ <title>Qualified names</title>
+
+ <para>To make life slightly easier, the GHCi prompt also
+ behaves as if there is an implicit <literal>import
+ qualified</literal> declaration for every module in every
+ package, and every module currently loaded into GHCi.</para>
+ </sect3>