diff options
author | Ian Lynagh <igloo@earth.li> | 2009-08-09 15:42:58 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-08-09 15:42:58 +0000 |
commit | a1895147d4d0480f65535c99488ba25873e97bff (patch) | |
tree | d5c59248bb01bf1ee9eee5850665666236dd20f1 /compiler/deSugar | |
parent | cf924c1549880f9ada192d24342dc610dea1d727 (diff) | |
download | haskell-a1895147d4d0480f65535c99488ba25873e97bff.tar.gz |
Minor refactoring
Diffstat (limited to 'compiler/deSugar')
-rw-r--r-- | compiler/deSugar/Check.lhs | 4 |
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..], |