X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FCheck.lhs;h=cc00536e85aebd21a7e7a97600ef7281053b2d18;hb=cbebca1c9164a5e5ae9b117d0dcf5ad217defc6d;hp=3d3aa4f3f248dde9ec1e81ce58ff957eb71130c2;hpb=e79e580be5d3d7caed73dec9e5a72b244cd1cc39;p=ghc-hetmet.git diff --git a/compiler/deSugar/Check.lhs b/compiler/deSugar/Check.lhs index 3d3aa4f..cc00536 100644 --- a/compiler/deSugar/Check.lhs +++ b/compiler/deSugar/Check.lhs @@ -27,7 +27,6 @@ import TysWiredIn import PrelNames import TyCon import Type -import Unify( dataConCannotMatch ) import SrcLoc import UniqSet import Util @@ -112,7 +111,8 @@ check :: [EquationInfo] -> ([ExhaustivePat], [EquationInfo]) -- if there are view patterns, just give up - don't know what the function is check qs = (untidy_warns, shadowed_eqns) where - (warns, used_nos) = check' ([1..] `zip` map tidy_eqn qs) + tidy_qs = map tidy_eqn qs + (warns, used_nos) = check' ([1..] `zip` tidy_qs) untidy_warns = map untidy_exhaustive warns shadowed_eqns = [eqn | (eqn,i) <- qs `zip` [1..], not (i `elementOfUniqSet` used_nos)]