From 1551823b9461f62755a30086ea18c7149b09b2bc Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 26 Mar 2002 19:08:19 +0000 Subject: [PATCH] [project @ 2002-03-26 19:08:19 by simonpj] Fix readHoleResult bug --- ghc/compiler/typecheck/TcPat.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/typecheck/TcPat.lhs b/ghc/compiler/typecheck/TcPat.lhs index cb08317..ea64699 100644 --- a/ghc/compiler/typecheck/TcPat.lhs +++ b/ghc/compiler/typecheck/TcPat.lhs @@ -139,7 +139,10 @@ tcPat tc_bndr pat_in@(AsPatIn name pat) pat_ty tvs, (name, bndr_id) `consBag` ids, lie_avail) tcPat tc_bndr WildPatIn pat_ty - = returnTc (WildPat pat_ty, emptyLIE, emptyBag, emptyBag, emptyLIE) + = zapToType pat_ty `thenNF_Tc` \ pat_ty' -> + -- We might have an incoming 'hole' type variable; no annotation + -- so zap it to a type. Rather like tcMonoPatBndr. + returnTc (WildPat pat_ty', emptyLIE, emptyBag, emptyBag, emptyLIE) tcPat tc_bndr (ParPatIn parend_pat) pat_ty = tcPat tc_bndr parend_pat pat_ty -- 1.7.10.4