allow build settings to be overriden by adding mk/validate.mk
[ghc-hetmet.git] / compiler / deSugar / Match.lhs
index a31494e..52c2674 100644 (file)
@@ -26,7 +26,6 @@ import DataCon
 import MatchCon
 import MatchLit
 import PrelInfo
-import TcType
 import Type
 import TysWiredIn
 import BasicTypes
@@ -448,15 +447,6 @@ tidy1 v (TuplePat pats boxity ty)
     arity = length pats
     tuple_ConPat = mkPrefixConPat (tupleCon boxity arity) pats ty
 
-tidy1 v (DictPat dicts methods)
-  = case num_of_d_and_ms of
-       0 -> tidy1 v (TuplePat [] Boxed unitTy) 
-       1 -> tidy1 v (unLoc (head dict_and_method_pats))
-       _ -> tidy1 v (mkVanillaTuplePat dict_and_method_pats Boxed)
-  where
-    num_of_d_and_ms     = length dicts + length methods
-    dict_and_method_pats = map nlVarPat (dicts ++ methods)
-
 -- LitPats: we *might* be able to replace these w/ a simpler form
 tidy1 v (LitPat lit)
   = returnDs (idDsWrapper, tidyLitPat lit)
@@ -610,7 +600,8 @@ JJQC 30-Nov-1997
 
 \begin{code}
 matchWrapper ctxt (MatchGroup matches match_ty)
-  = do { eqns_info   <- mapM mk_eqn_info matches
+  = ASSERT( notNull matches )
+    do { eqns_info   <- mapM mk_eqn_info matches
        ; new_vars    <- selectMatchVars arg_pats
        ; result_expr <- matchEquations ctxt new_vars eqns_info rhs_ty
        ; return (new_vars, result_expr) }