From f0d65bc7f6d4f70490fedac2a6ef0bb113c71443 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 31 May 2001 09:46:21 +0000 Subject: [PATCH] [project @ 2001-05-31 09:46:21 by simonpj] ---------------------------------- Fix an existential-constructor bug ---------------------------------- DON'T MERGE! This fixes a bug I introduced in my tidying up for scoped type variables. You'll get bizarre behaviour from the HEAD if you use existentials, until you add this fix! --- ghc/compiler/typecheck/TcMatches.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/typecheck/TcMatches.lhs b/ghc/compiler/typecheck/TcMatches.lhs index 2e4e4e1..d6ce7a9 100644 --- a/ghc/compiler/typecheck/TcMatches.lhs +++ b/ghc/compiler/typecheck/TcMatches.lhs @@ -224,9 +224,9 @@ tcMatchPats pats expected_ty thing_inside -- I'm a bit concerned that lie_req1 from an 'inner' pattern in the list -- might need (via lie_req2) something made available from an 'outer' -- pattern. But it's inconvenient to deal with, and I can't find an example - tcCheckExistentialPat pat_ids ex_tvs lie_avail lie_req1 rhs_ty `thenTc` \ (lie_req1', ex_binds) -> + tcCheckExistentialPat pat_ids ex_tvs lie_avail lie_req2 rhs_ty `thenTc` \ (lie_req2', ex_binds) -> - returnTc (result, lie_req1' `plusLIE` lie_req2, ex_binds) + returnTc (result, lie_req1 `plusLIE` lie_req2', ex_binds) tcAddScopedTyVars :: [RenamedHsType] -> TcM a -> TcM a -- Find the not-already-in-scope signature type variables, -- 1.7.10.4