projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
16fc5c3
)
[project @ 2002-03-26 19:08:19 by simonpj]
author
simonpj
<unknown>
Tue, 26 Mar 2002 19:08:19 +0000
(19:08 +0000)
committer
simonpj
<unknown>
Tue, 26 Mar 2002 19:08:19 +0000
(19:08 +0000)
Fix readHoleResult bug
ghc/compiler/typecheck/TcPat.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/typecheck/TcPat.lhs
b/ghc/compiler/typecheck/TcPat.lhs
index
cb08317
..
ea64699
100644
(file)
--- 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
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
tcPat tc_bndr (ParPatIn parend_pat) pat_ty
= tcPat tc_bndr parend_pat pat_ty