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

On branch  : master
Link       : 
http://ghc.haskell.org/trac/ghc/changeset/9864edf2557d7a52a4c3d8cccfe1e9e12bf26ebf/ghc

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

commit 9864edf2557d7a52a4c3d8cccfe1e9e12bf26ebf
Author: Simon Peyton Jones <simo...@microsoft.com>
Date:   Wed Oct 2 13:49:23 2013 +0100

    Look through tick-boxes when looking for integral literals in the desugarer
    
    Fixes Trac #8334


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

9864edf2557d7a52a4c3d8cccfe1e9e12bf26ebf
 compiler/deSugar/MatchLit.lhs |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs
index d79cfcc..f4c9465 100644
--- a/compiler/deSugar/MatchLit.lhs
+++ b/compiler/deSugar/MatchLit.lhs
@@ -213,6 +213,11 @@ warnAboutEmptyEnumerations dflags fromExpr mThnExpr toExpr
   | otherwise = return ()
 
 getLHsIntegralLit :: LHsExpr Id -> Maybe (Integer, Name)
+-- See if the expression is an Integral literal
+-- Remember to look through automatically-added tick-boxes! (Trac #8384)
+getLHsIntegralLit (L _ (HsPar e))            = getLHsIntegralLit e
+getLHsIntegralLit (L _ (HsTick _ e))         = getLHsIntegralLit e
+getLHsIntegralLit (L _ (HsBinTick _ _ e))    = getLHsIntegralLit e
 getLHsIntegralLit (L _ (HsOverLit over_lit)) = getIntegralLit over_lit
 getLHsIntegralLit _ = Nothing
 

_______________________________________________
ghc-commits mailing list
ghc-commits@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-commits

Reply via email to