[commit: ghc] wip/type-app: Wibble to TypeEqOrigin for better errors (25aa251)
git at git.haskell.org
git at git.haskell.org
Fri Aug 7 12:06:41 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/type-app
Link : http://ghc.haskell.org/trac/ghc/changeset/25aa2519b7ffed668bd1a22e80830865d8b4f840/ghc
>---------------------------------------------------------------
commit 25aa2519b7ffed668bd1a22e80830865d8b4f840
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Wed Aug 5 08:36:00 2015 -0400
Wibble to TypeEqOrigin for better errors
>---------------------------------------------------------------
25aa2519b7ffed668bd1a22e80830865d8b4f840
compiler/typecheck/TcUnify.hs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compiler/typecheck/TcUnify.hs b/compiler/typecheck/TcUnify.hs
index 7bee699..7dbe72e 100644
--- a/compiler/typecheck/TcUnify.hs
+++ b/compiler/typecheck/TcUnify.hs
@@ -726,7 +726,9 @@ tc_sub_type_ds eq_orig inst_orig ctxt ty_actual ty_expected
-- typecheck/should_compile/T4284.
| otherwise
-> do { (wrap, rho_a) <- deeplyInstantiate inst_orig ty_actual
- ; cow <- uType eq_orig rho_a ty_expected
+ ; cow <- unifyType rho_a ty_expected
+ -- NB: unifyType, not uType. We want to refresh
+ -- the TypeEqOrigin to use the inst'ed type
; return (coToHsWrapper cow <.> wrap) } }
go (FunTy act_arg act_res) (FunTy exp_arg exp_res)
More information about the ghc-commits
mailing list