[project @ 2005-05-20 11:42:57 by simonpj]
authorsimonpj <unknown>
Fri, 20 May 2005 11:42:57 +0000 (11:42 +0000)
committersimonpj <unknown>
Fri, 20 May 2005 11:42:57 +0000 (11:42 +0000)
commit02a06a56c6511b19ef411fd3884089ea996cc26b
tree9412152c178d5f262bdf1d26639c5cb039090e93
parent40d3a06b353392a322d8425fb5dd9f103f4421f3
[project @ 2005-05-20 11:42:57 by simonpj]
Improve the GHCi interaction

Merge to STABLE?

This fix addresses Sourceforge #1156554 "GHCi: No instance for (Show (IO ()))",
and simultaneously improves the top-level interaction in two other ways:

- Only one error can show up (previously there could be two)

- If an I/O action gives a Showable result, the result is printed
  (provided it isn't ()).  So
prompt> return 4
  prints 4, rather than nothing

- For command-line 'let' and 'x<-e' forms, if exactly one variable
  is bound, we print its value if it is Showable and not ()
prompt> let x = 4
4
prompt> x <- return 5
5
ghc/compiler/hsSyn/HsUtils.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcUnify.lhs