projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor (again) the handling of default methods
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcPat.lhs
diff --git
a/compiler/typecheck/TcPat.lhs
b/compiler/typecheck/TcPat.lhs
index
5a54f8d
..
5592b80
100644
(file)
--- a/
compiler/typecheck/TcPat.lhs
+++ b/
compiler/typecheck/TcPat.lhs
@@
-433,7
+433,11
@@
tc_pat pstate (SigPatIn pat sig_ty) pat_ty thing_inside
failWithTc (badSigPat pat_ty)
; (pat', tvs, res) <- tcExtendTyVarEnv2 tv_binds $
tc_lpat pat inner_ty pstate thing_inside
failWithTc (badSigPat pat_ty)
; (pat', tvs, res) <- tcExtendTyVarEnv2 tv_binds $
tc_lpat pat inner_ty pstate thing_inside
- ; return (SigPatOut pat' inner_ty, tvs, res) }
+ ; return (SigPatOut pat' inner_ty, tvs, res) }
+
+-- Use this when we add pattern coercions back in
+-- return (mkCoPatCoI (mkSymCoI coi) (SigPatOut pat' inner_ty) pat_ty
+-- , tvs, res) }
tc_pat _ pat@(TypePat _) _ _
= failWithTc (badTypePat pat)
tc_pat _ pat@(TypePat _) _ _
= failWithTc (badTypePat pat)
@@
-628,7
+632,7
@@
tcConPat pstate con_span data_con tycon pat_ty arg_pats thing_inside
unwrap_ty res_pat
-- Add the stupid theta
unwrap_ty res_pat
-- Add the stupid theta
- ; addDataConStupidTheta data_con ctxt_res_tys
+ ; setSrcSpan con_span $ addDataConStupidTheta data_con ctxt_res_tys
; ex_tvs' <- tcInstSkolTyVars skol_info ex_tvs
-- Get location from monad, not from ex_tvs
; ex_tvs' <- tcInstSkolTyVars skol_info ex_tvs
-- Get location from monad, not from ex_tvs