From: sof Date: Thu, 21 Jan 1999 20:00:55 +0000 (+0000) Subject: [project @ 1999-01-21 20:00:55 by sof] X-Git-Tag: Approx_2487_patches~28 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=df4e13fc6f98ac689238ba325c7b276bbd8e568c;p=ghc-hetmet.git [project @ 1999-01-21 20:00:55 by sof] dsExpr: make sure special case for unboxed tuple patterns only 'fire' when the tup. pat. is unboxed. --- diff --git a/ghc/compiler/deSugar/DsExpr.lhs b/ghc/compiler/deSugar/DsExpr.lhs index afdf166..622b4ef 100644 --- a/ghc/compiler/deSugar/DsExpr.lhs +++ b/ghc/compiler/deSugar/DsExpr.lhs @@ -306,10 +306,10 @@ dsExpr (HsSCC cc expr) getModuleAndGroupDs `thenDs` \ (mod_name, group_name) -> returnDs (Note (SCC (mkUserCC cc mod_name group_name)) core_expr) --- special case to handle unboxed tuple patterns +-- special case to handle unboxed tuple patterns. dsExpr (HsCase discrim matches@[Match _ [TuplePat ps boxed] _ _] src_loc) - | all var_pat ps + | not boxed && all var_pat ps = putSrcLocDs src_loc $ dsExpr discrim `thenDs` \ core_discrim -> matchWrapper CaseMatch matches "case" `thenDs` \ ([discrim_var], matching_code) ->