[project @ 1999-01-21 20:00:55 by sof]
authorsof <unknown>
Thu, 21 Jan 1999 20:00:55 +0000 (20:00 +0000)
committersof <unknown>
Thu, 21 Jan 1999 20:00:55 +0000 (20:00 +0000)
dsExpr: make sure special case for unboxed tuple patterns only
'fire' when the tup. pat. is unboxed.

ghc/compiler/deSugar/DsExpr.lhs

index afdf166..622b4ef 100644 (file)
@@ -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) ->