[commit: ghc] master: Improve pretty-printing for holes (eb6c3ee)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/eb6c3ee0f85737821525462fcb7ddd38c3f57427

>---------------------------------------------------------------

commit eb6c3ee0f85737821525462fcb7ddd38c3f57427
Author: Simon Peyton Jones <[email protected]>
Date:   Thu Oct 4 17:50:34 2012 +0100

    Improve pretty-printing for holes

>---------------------------------------------------------------

 compiler/hsSyn/HsExpr.lhs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compiler/hsSyn/HsExpr.lhs b/compiler/hsSyn/HsExpr.lhs
index ef0263d..0638422 100644
--- a/compiler/hsSyn/HsExpr.lhs
+++ b/compiler/hsSyn/HsExpr.lhs
@@ -619,6 +619,7 @@ hsExprNeedsParens (PArrSeq {})        = False
 hsExprNeedsParens (HsLit {})          = False
 hsExprNeedsParens (HsOverLit {})      = False
 hsExprNeedsParens (HsVar {})          = False
+hsExprNeedsParens (HsHole {})         = False
 hsExprNeedsParens (HsIPVar {})        = False
 hsExprNeedsParens (ExplicitTuple {})  = False
 hsExprNeedsParens (ExplicitList {})   = False
@@ -637,6 +638,7 @@ isAtomicHsExpr (HsVar {})     = True
 isAtomicHsExpr (HsLit {})     = True
 isAtomicHsExpr (HsOverLit {}) = True
 isAtomicHsExpr (HsIPVar {})   = True
+isAtomicHsExpr (HsHole {})    = True
 isAtomicHsExpr (HsWrap _ e)   = isAtomicHsExpr e
 isAtomicHsExpr (HsPar e)      = isAtomicHsExpr (unLoc e)
 isAtomicHsExpr _              = False
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.