summaryrefslogtreecommitdiff
path: root/ghc/compiler/hsSyn/HsUtils.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>2005-05-20 11:42:57 +0000
committersimonpj <unknown>2005-05-20 11:42:57 +0000
commit02a06a56c6511b19ef411fd3884089ea996cc26b (patch)
tree9412152c178d5f262bdf1d26639c5cb039090e93 /ghc/compiler/hsSyn/HsUtils.lhs
parent40d3a06b353392a322d8425fb5dd9f103f4421f3 (diff)
downloadhaskell-02a06a56c6511b19ef411fd3884089ea996cc26b.tar.gz
[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
Diffstat (limited to 'ghc/compiler/hsSyn/HsUtils.lhs')
-rw-r--r--ghc/compiler/hsSyn/HsUtils.lhs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/compiler/hsSyn/HsUtils.lhs b/ghc/compiler/hsSyn/HsUtils.lhs
index 6134d5043c..d2e757e373 100644
--- a/ghc/compiler/hsSyn/HsUtils.lhs
+++ b/ghc/compiler/hsSyn/HsUtils.lhs
@@ -221,12 +221,12 @@ nlHsFunTy a b = noLoc (HsFunTy a b)
%************************************************************************
\begin{code}
-mkVarBind :: SrcSpan -> RdrName -> LHsExpr RdrName -> LHsBind RdrName
+mkVarBind :: SrcSpan -> name -> LHsExpr name -> LHsBind name
mkVarBind loc var rhs = mk_easy_FunBind loc var [] emptyLHsBinds rhs
-mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat RdrName]
- -> LHsBinds RdrName -> LHsExpr RdrName
- -> LHsBind RdrName
+mk_easy_FunBind :: SrcSpan -> name -> [LPat name]
+ -> LHsBinds name -> LHsExpr name
+ -> LHsBind name
mk_easy_FunBind loc fun pats binds expr
= L loc (FunBind (L loc fun) False{-not infix-}