[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