Add {-# OPTIONS_GHC -w #-} and some blurb to all compiler modules
[ghc-hetmet.git] / compiler / deSugar / MatchLit.lhs
index 2cdab30..c8e8e62 100644 (file)
@@ -6,6 +6,13 @@
 Pattern-matching literal patterns
 
 \begin{code}
+{-# OPTIONS_GHC -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/WorkingConventions#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