[commit: ghc] master: Simplify the base case for 'check', and thereby fix Trac #7669 (9162d15)

Simon Peyton Jones simonpj at microsoft.com
Wed Feb 13 18:44:06 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/9162d159a62d19d4b371b7348eb1b524001fddcd

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

commit 9162d159a62d19d4b371b7348eb1b524001fddcd
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Feb 13 17:37:17 2013 +0000

    Simplify the base case for 'check', and thereby fix Trac #7669

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

 compiler/deSugar/Check.lhs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs
index 7736aa6..2932b01 100644
--- a/compiler/deSugar/Check.lhs
+++ b/compiler/deSugar/Check.lhs
@@ -205,7 +205,10 @@ check' :: [(EqnNo, EquationInfo)]
         -> ([ExhaustivePat],    -- Pattern scheme that might not be matched at all
             EqnSet)             -- Eqns that are used (others are overlapped)
 
-check' [] = ([([],[])],emptyUniqSet)
+check' [] = ([],emptyUniqSet)
+  -- Was    ([([],[])], emptyUniqSet)
+  -- But that (a) seems weird, and (b) triggered Trac #7669 
+  -- So now I'm just doing the simple obvious thing
 
 check' ((n, EqnInfo { eqn_pats = ps, eqn_rhs = MatchResult can_fail _ }) : rs)
    | first_eqn_all_vars && case can_fail of { CantFail -> True; CanFail -> False }





More information about the ghc-commits mailing list