From: sof Date: Mon, 26 May 1997 04:47:48 +0000 (+0000) Subject: [project @ 1997-05-26 04:47:12 by sof] X-Git-Tag: Approximately_1000_patches_recorded~487 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b54a4ee4cf8512acedb75d6f54e1074303e42b71;p=ghc-hetmet.git [project @ 1997-05-26 04:47:12 by sof] Updated imports --- diff --git a/ghc/compiler/deSugar/Match.lhs b/ghc/compiler/deSugar/Match.lhs index 7629999..78eb5ca 100644 --- a/ghc/compiler/deSugar/Match.lhs +++ b/ghc/compiler/deSugar/Match.lhs @@ -32,7 +32,7 @@ import Id ( idType, dataConFieldLabels, GenId{-instance-}, SYN_IE(Id) ) import Name ( Name {--O only-} ) -import PprStyle ( PprStyle(..) ) +import Outputable ( PprStyle(..), Outputable(..) ) import PprType ( GenType{-instance-}, GenTyVar{-ditto-} ) import Pretty ( Doc ) import PrelVals ( pAT_ERROR_ID ) @@ -51,10 +51,6 @@ import TysWiredIn ( nilDataCon, consDataCon, mkTupleTy, mkListTy, ) import Unique ( Unique{-instance Eq-} ) import Util ( panic, pprPanic, assertPanic ) -#if __GLASGOW_HASKELL__ >= 202 -import Outputable ( Outputable(..) ) -#endif - \end{code} The function @match@ is basically the same as in the Wadler chapter, @@ -337,7 +333,7 @@ tidy1 v (RecPat con_id pat_ty rpats) match_result pats = map mk_pat tagged_arg_tys -- Boring stuff to find the arg-tys of the constructor - (_, inst_tys, _) = {-trace "Match.getAppDataTyConExpandingDicts" $-} getAppDataTyConExpandingDicts pat_ty + (_, inst_tys, _) = getAppDataTyConExpandingDicts pat_ty con_arg_tys' = dataConArgTys con_id inst_tys tagged_arg_tys = con_arg_tys' `zip` (dataConFieldLabels con_id) diff --git a/ghc/compiler/deSugar/MatchCon.lhs b/ghc/compiler/deSugar/MatchCon.lhs index 3ccebcb..7abf185 100644 --- a/ghc/compiler/deSugar/MatchCon.lhs +++ b/ghc/compiler/deSugar/MatchCon.lhs @@ -17,7 +17,7 @@ import DsHsSyn ( outPatType ) import DsMonad import DsUtils -import Id ( isDataCon, GenId{-instances-}, SYN_IE(Id) ) +import Id ( GenId{-instances-}, SYN_IE(Id) ) import Util ( panic, assertPanic ) \end{code} @@ -89,8 +89,7 @@ Wadler's chapter in SLPJ. match_cons_used _ [{- no more eqns -}] _ = returnDs [] match_cons_used vars eqns_info@(EqnInfo (ConPat data_con _ arg_pats : ps1) _ : eqns) shadows - = ASSERT(isDataCon data_con) - let + = let (eqns_for_this_con, eqns_not_for_this_con) = splitByCon eqns_info (shadows_for_this_con, shadows_not_for_this_con) = splitByCon shadows in