Commit 1169351d authored by Simon Marlow's avatar Simon Marlow
Browse files

Fix overnight build breakage (fix from simonpj)

compiler/simplCore/SimplUtils.lhs:1668:5-25: Irrefutable pattern failed for pattern ((_, _, rhs1) : _)
parent 2bc9d896
...@@ -1636,7 +1636,7 @@ mkCase dflags scrut bndr alts_ty alts = mkCase1 dflags scrut bndr alts_ty alts ...@@ -1636,7 +1636,7 @@ mkCase dflags scrut bndr alts_ty alts = mkCase1 dflags scrut bndr alts_ty alts
-- 2. Eliminate Identity Case -- 2. Eliminate Identity Case
-------------------------------------------------- --------------------------------------------------
mkCase1 _dflags scrut case_bndr _ alts -- Identity case mkCase1 _dflags scrut case_bndr _ alts@((_,_,rhs1) : _) -- Identity case
| all identity_alt alts | all identity_alt alts
= do { tick (CaseIdentity case_bndr) = do { tick (CaseIdentity case_bndr)
; return (re_cast scrut rhs1) } ; return (re_cast scrut rhs1) }
...@@ -1665,8 +1665,6 @@ mkCase1 _dflags scrut case_bndr _ alts -- Identity case ...@@ -1665,8 +1665,6 @@ mkCase1 _dflags scrut case_bndr _ alts -- Identity case
-- --
-- Don't worry about nested casts, because the simplifier combines them -- Don't worry about nested casts, because the simplifier combines them
((_,_,rhs1):_) = alts
re_cast scrut (Cast rhs co) = Cast (re_cast scrut rhs) co re_cast scrut (Cast rhs co) = Cast (re_cast scrut rhs) co
re_cast scrut _ = scrut re_cast scrut _ = scrut
......
Markdown is supported
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