summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2006-09-03 21:57:48 +0000
committerIan Lynagh <igloo@earth.li>2006-09-03 21:57:48 +0000
commit0583778f773db20f20c547aa67abe59dfc77b875 (patch)
tree34eac7d445963c388b5492fbdf1418cca0997cd4
parente8982ebc45244da2f414eb920dfa798dbdc8cebc (diff)
downloadhaskell-0583778f773db20f20c547aa67abe59dfc77b875.tar.gz
More doc output fixes
-rw-r--r--docs/users_guide/ghci.xml23
1 files changed, 14 insertions, 9 deletions
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index b5642b127f..929e9dd376 100644
--- a/docs/users_guide/ghci.xml
+++ b/docs/users_guide/ghci.xml
@@ -633,9 +633,9 @@ Prelude> it * 2
expression, and if it doesn't have an <literal>IO</literal> type,
then it transforms it as follows: an expression
<replaceable>e</replaceable> turns into
-<screen>
- let it = <replaceable>e</replaceable>;
- print it
+<screen>
+let it = <replaceable>e</replaceable>;
+print it
</screen>
which is then run as an IO-action.</para>
@@ -644,10 +644,14 @@ Prelude> it * 2
complain:</para>
<screen>
-Prelude> id
-No instance for `Show (a -> a)'
-arising from use of `print'
-in a `do' expression pattern binding: print it
+Prelude&gt; id
+
+&lt;interactive&gt;:1:0:
+ No instance for (Show (a -&gt; a))
+ arising from use of `print' at &lt;interactive&gt;:1:0-1
+ Possible fix: add an instance declaration for (Show (a -> a))
+ In the expression: print it
+ In a 'do' expression: print it
</screen>
<para>The error message contains some clues as to the
@@ -659,14 +663,15 @@ in a `do' expression pattern binding: print it
which is of type <literal>a</literal>. eg.:</para>
<screen>
Prelude> Time.getClockTime
+Wed Mar 14 12:23:13 GMT 2001
Prelude> print it
Wed Mar 14 12:23:13 GMT 2001
</screen>
<para>The corresponding translation for an IO-typed
<replaceable>e</replaceable> is
-<screen>
- it &lt;- <replaceable>e</replaceable>
+<screen>
+it &lt;- <replaceable>e</replaceable>
</screen>
</para>