summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-09-16 09:59:37 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-09-16 09:59:37 +0100
commitc782840fb75711f5e80f313efbeea0bd7f817f0b (patch)
tree5c0e6d830fa85f481bbc9ab876a3c54de4d218d2
parentb215384ba29f2ab85bf4655881fb78ff1161c975 (diff)
downloadhaskell-c782840fb75711f5e80f313efbeea0bd7f817f0b.tar.gz
Correct a back-to-front coercion (fixes Trac #5490)
This bug has been present for ages, but it only shows up in view patterns where coercions are also involved. Easy to fix!
-rw-r--r--compiler/typecheck/TcPat.lhs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs
index e16c97d000..6be0a28978 100644
--- a/compiler/typecheck/TcPat.lhs
+++ b/compiler/typecheck/TcPat.lhs
@@ -442,7 +442,7 @@ tc_pat penv vpat@(ViewPat expr pat _) overall_pat_ty thing_inside
-- we will only be able to use view at one instantation in the
-- rest of the view
; (expr_co, pat_ty) <- tcInfer $ \ pat_ty ->
- unifyPatType expr'_inferred (mkFunTy overall_pat_ty pat_ty)
+ unifyType expr'_inferred (mkFunTy overall_pat_ty pat_ty)
-- pattern must have pat_ty
; (pat', res) <- tc_lpat pat pat_ty penv thing_inside