simonpj 2005/05/20 04:42:57 PDT
Modified files:
ghc/compiler/hsSyn HsUtils.lhs
ghc/compiler/typecheck TcRnDriver.lhs TcRnMonad.lhs
TcUnify.lhs
Log:
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
Revision Changes Path
1.7 +4 -4 fptools/ghc/compiler/hsSyn/HsUtils.lhs
1.119 +88 -72 fptools/ghc/compiler/typecheck/TcRnDriver.lhs
1.54 +65 -45 fptools/ghc/compiler/typecheck/TcRnMonad.lhs
1.67 +2 -2 fptools/ghc/compiler/typecheck/TcUnify.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc