trac #2362 (full import syntax in ghci)
[ghc-hetmet.git] / docs / users_guide / ghci.xml
index 0a50bcc..1ff5ffd 100644 (file)
 
 <screen>
 $ ghci
-GHCi, version 6.8.1: http://www.haskell.org/ghc/  :? for help
+GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
+Loading package ghc-prim ... linking ... done.
+Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
+Loading package ffi-1.0 ... linking ... done.
 Prelude> 
 </screen>
 
@@ -586,10 +589,12 @@ hello
 Prelude IO>
 </screen>
 
-      <para>(Note: you can use <literal>import M</literal> as an
-      alternative to <literal>:module +M</literal>, and
+      <para>(Note: you can use conventional
+      haskell <literal>import</literal> syntax as
+      well, but this does not support
+      <literal>*</literal> forms).
       <literal>:module</literal> can also be shortened to 
-      <literal>:m</literal>). The full syntax of the
+      <literal>:m</literal>. The full syntax of the
       <literal>:module</literal> command is:</para>
 
 <screen>
@@ -814,12 +819,12 @@ it &lt;- <replaceable>e</replaceable>
   ghci> reverse []
 </programlisting>
       What should GHCi do?  Strictly speaking, the program is ambiguous.  <literal>show (reverse [])</literal>
-      (which is what GHCi computes here) has type <literal>Show a => a</literal> and how that displays depends 
+      (which is what GHCi computes here) has type <literal>Show a => String</literal> and how that displays depends
       on the type <literal>a</literal>.  For example:
 <programlisting>
-  ghci> (reverse []) :: String
+  ghci> reverse ([] :: String)
   ""
-  ghci> (reverse []) :: [Int]
+  ghci> reverse ([] :: [Int])
   []
 </programlisting>
     However, it is tiresome for the user to have to specify the type, so GHCi extends Haskell's type-defaulting