X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FMatchLit.lhs;h=610a423b1d04d82649eedf712de696bdd4f0c6e3;hb=6202305819577fce2b11ab509ed94422775df30e;hp=2cdab30bf8b162c0059b9182b1eab6385bdfb7b7;hpb=90dc9026b091be5cca5da4c6cbd3713ecc493361;p=ghc-hetmet.git diff --git a/compiler/deSugar/MatchLit.lhs b/compiler/deSugar/MatchLit.lhs index 2cdab30..610a423 100644 --- a/compiler/deSugar/MatchLit.lhs +++ b/compiler/deSugar/MatchLit.lhs @@ -6,6 +6,13 @@ Pattern-matching literal patterns \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module MatchLit ( dsLit, dsOverLit, hsLitKey, hsOverLitKey, tidyLitPat, tidyNPat, matchLiterals, matchNPlusKPats, matchNPats ) where @@ -27,12 +34,10 @@ import TcType import Type import PrelNames import TysWiredIn -import PrelNames import Unique import Literal import SrcLoc import Ratio -import SrcLoc import Outputable import Util import FastString @@ -183,7 +188,8 @@ matchLiterals :: [Id] -> DsM MatchResult matchLiterals (var:vars) ty sub_groups - = do { -- Deal with each group + = ASSERT( all notNull sub_groups ) + do { -- Deal with each group ; alts <- mapM match_group sub_groups -- Combine results. For everything except String