[commit: ghc] wip/T8584: tcTySig for PatSynSigs: filter out universially-bound type variables from ex_tvs (01a9b22)
git at git.haskell.org
git at git.haskell.org
Thu Oct 16 14:24:18 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T8584
Link : http://ghc.haskell.org/trac/ghc/changeset/01a9b2240c9164e172c7da11a085329e14c824c7/ghc
>---------------------------------------------------------------
commit 01a9b2240c9164e172c7da11a085329e14c824c7
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Thu Oct 16 22:17:08 2014 +0800
tcTySig for PatSynSigs: filter out universially-bound type variables from ex_tvs
>---------------------------------------------------------------
01a9b2240c9164e172c7da11a085329e14c824c7
compiler/typecheck/TcBinds.lhs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs
index 8ee53db..e92c1ec 100644
--- a/compiler/typecheck/TcBinds.lhs
+++ b/compiler/typecheck/TcBinds.lhs
@@ -1313,7 +1313,8 @@ tcTySig (L loc (PatSynSig (L _ name) args ty (_, ex_tvs, prov) (_, univ_tvs, req
{ ty' <- tcHsSigType ctxt ty
; req' <- tcHsContext req
; tcHsTyVarBndrs ex_tvs $ \ ex_tvs' -> do
- { args' <- mapM (tcHsSigType ctxt) $ case args of
+ { ex_tvs' <- return $ filter (`notElem` univ_tvs') ex_tvs'
+ ; args' <- mapM (tcHsSigType ctxt) $ case args of
PrefixPatSyn tys -> tys
InfixPatSyn ty1 ty2 -> [ty1, ty2]
; prov' <- tcHsContext prov
More information about the ghc-commits
mailing list