From: simonpj Date: Tue, 26 Mar 2002 19:08:19 +0000 (+0000) Subject: [project @ 2002-03-26 19:08:19 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~2223 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1551823b9461f62755a30086ea18c7149b09b2bc;p=ghc-hetmet.git [project @ 2002-03-26 19:08:19 by simonpj] Fix readHoleResult bug --- 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