[commit: ghc] overlapping-tyfams: Fixed bug about counting arguments in patterns. (0cd4e91)

Richard Eisenberg eir at cis.upenn.edu
Fri Jun 21 15:17:01 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : overlapping-tyfams

https://github.com/ghc/ghc/commit/0cd4e91459e9574fa842bc808d8cda236c140d3e

>---------------------------------------------------------------

commit 0cd4e91459e9574fa842bc808d8cda236c140d3e
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Wed Jun 19 08:34:48 2013 +0100

    Fixed bug about counting arguments in patterns.

>---------------------------------------------------------------

 compiler/typecheck/TcValidity.lhs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcValidity.lhs b/compiler/typecheck/TcValidity.lhs
index 1823802..192de1e 100644
--- a/compiler/typecheck/TcValidity.lhs
+++ b/compiler/typecheck/TcValidity.lhs
@@ -1141,8 +1141,7 @@ checkValidFamPats fam_tc tvs ty_pats
        ; mapM_ checkTyFamFreeness ty_pats
        ; let unbound_tvs = filterOut (`elemVarSet` exactTyVarsOfTypes ty_pats) tvs
        ; checkTc (null unbound_tvs) (famPatErr fam_tc unbound_tvs ty_pats) }
-  where fam_arity    = tyConArity fam_tc - length fam_kvs
-        (fam_kvs, _) = splitForAllTys (tyConKind fam_tc)
+  where fam_arity    = tyConArity fam_tc
 
 wrongNumberOfParmsErr :: Arity -> SDoc
 wrongNumberOfParmsErr exp_arity





More information about the ghc-commits mailing list