[commit: ghc] master: Don't panic when printing match with RecUpd context (68cbe52)

git at git.haskell.org git at git.haskell.org
Sat Feb 4 23:08:39 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/68cbe52fd3ae618a9778e79bf6a9806bab21aff2/ghc

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

commit 68cbe52fd3ae618a9778e79bf6a9806bab21aff2
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Sat Feb 4 15:15:06 2017 -0500

    Don't panic when printing match with RecUpd context
    
    Reviewers: bgamari, austin
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3065
    
    GHC Trac Issues: #12957


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

68cbe52fd3ae618a9778e79bf6a9806bab21aff2
 compiler/hsSyn/HsExpr.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs
index 617972d..7500189 100644
--- a/compiler/hsSyn/HsExpr.hs
+++ b/compiler/hsSyn/HsExpr.hs
@@ -2403,7 +2403,8 @@ matchSeparator LambdaExpr   = text "->"
 matchSeparator ProcExpr     = text "->"
 matchSeparator PatBindRhs   = text "="
 matchSeparator (StmtCtxt _) = text "<-"
-matchSeparator RecUpd       = panic "unused"
+matchSeparator RecUpd       = text "=" -- This can be printed by the pattern
+                                       -- match checker trace
 matchSeparator ThPatSplice  = panic "unused"
 matchSeparator ThPatQuote   = panic "unused"
 matchSeparator PatSyn       = panic "unused"



More information about the ghc-commits mailing list