X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FCheck.lhs;h=63ce765c08b75ea536af910684032fd90bf386ea;hp=ec72287cea371f13b0dd2040e2ca482a3116693a;hb=a1895147d4d0480f65535c99488ba25873e97bff;hpb=cf924c1549880f9ada192d24342dc610dea1d727 diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs index ec72287..63ce765 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..],