summaryrefslogtreecommitdiff
path: root/compiler/deSugar
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-08-09 15:42:58 +0000
committerIan Lynagh <igloo@earth.li>2009-08-09 15:42:58 +0000
commita1895147d4d0480f65535c99488ba25873e97bff (patch)
treed5c59248bb01bf1ee9eee5850665666236dd20f1 /compiler/deSugar
parentcf924c1549880f9ada192d24342dc610dea1d727 (diff)
downloadhaskell-a1895147d4d0480f65535c99488ba25873e97bff.tar.gz
Minor refactoring
Diffstat (limited to 'compiler/deSugar')
-rw-r--r--compiler/deSugar/Check.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs
index ec72287cea..63ce765c08 100644
--- a/compiler/deSugar/Check.lhs
+++ b/compiler/deSugar/Check.lhs
@@ -113,8 +113,8 @@ check :: [EquationInfo] -> ([ExhaustivePat], [EquationInfo])
check qs | has_view_pattern = ([],[])
| otherwise = (untidy_warns, shadowed_eqns)
where
- is_view x = hasViewPat x
- has_view_pattern = any (\(EqnInfo p _) -> any is_view p) qs
+ eqnInfo_has_view_pattern (EqnInfo ps _) = any (hasViewPat . noLoc) ps
+ has_view_pattern = any eqnInfo_has_view_pattern qs
(warns, used_nos) = check' ([1..] `zip` map simplify_eqn qs)
untidy_warns = map untidy_exhaustive warns
shadowed_eqns = [eqn | (eqn,i) <- qs `zip` [1..],