X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fghci.xml;h=929e9dd37686c87d65e4e4c38809978e9507c994;hp=b5642b127fff061260371412e715055a32050884;hb=0583778f773db20f20c547aa67abe59dfc77b875;hpb=e8982ebc45244da2f414eb920dfa798dbdc8cebc
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index b5642b1..929e9dd 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 IO type,
then it transforms it as follows: an expression
e turns into
-
- let it = e;
- print it
+
+let it = e;
+print it
which is then run as an IO-action.
@@ -644,10 +644,14 @@ Prelude> it * 2
complain:
-Prelude> id
-No instance for `Show (a -> a)'
-arising from use of `print'
-in a `do' expression pattern binding: print it
+Prelude> id
+
+<interactive>:1:0:
+ No instance for (Show (a -> a))
+ arising from use of `print' at <interactive>:1:0-1
+ Possible fix: add an instance declaration for (Show (a -> a))
+ In the expression: print it
+ In a 'do' expression: print it
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 a. eg.:
Prelude> Time.getClockTime
+Wed Mar 14 12:23:13 GMT 2001
Prelude> print it
Wed Mar 14 12:23:13 GMT 2001
The corresponding translation for an IO-typed
e is
-
- it <- e
+
+it <- e