summaryrefslogtreecommitdiff
path: root/compiler/deSugar/Check.hs
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2019-03-17 13:47:09 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2019-03-17 14:56:19 +0300
commitfd4009d80533803a4dee959015b96c1626e5ed88 (patch)
treef8261b50be739b9675ef710d890aa58d0ced5a98 /compiler/deSugar/Check.hs
parentcb61371e3260e07be724a04b72a935133f66b514 (diff)
downloadhaskell-wip/pat-builder.tar.gz
PatBuilder - WIPwip/pat-builder
Diffstat (limited to 'compiler/deSugar/Check.hs')
-rw-r--r--compiler/deSugar/Check.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs
index db3a501fcf..8522cf4e26 100644
--- a/compiler/deSugar/Check.hs
+++ b/compiler/deSugar/Check.hs
@@ -915,12 +915,12 @@ truePattern = nullaryConPattern (RealDataCon trueDataCon)
-- | A fake guard pattern (True <- _) used to represent cases we cannot handle
fake_pat :: Pattern
fake_pat = PmGrd { pm_grd_pv = [truePattern]
- , pm_grd_expr = PmExprOther (EWildPat noExt) }
+ , pm_grd_expr = PmExprFake }
{-# INLINE fake_pat #-}
-- | Check whether a guard pattern is generated by the checker (unhandled)
isFakeGuard :: [Pattern] -> PmExpr -> Bool
-isFakeGuard [PmCon { pm_con_con = RealDataCon c }] (PmExprOther (EWildPat _))
+isFakeGuard [PmCon { pm_con_con = RealDataCon c }] PmExprFake
| c == trueDataCon = True
| otherwise = False
isFakeGuard _pats _e = False