Commit df4e13fc authored by sof's avatar sof
Browse files

[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.
parent 3c1e70b8
......@@ -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) ->
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment