[commit: ghc] wip/T14880-2-step2-c123: Close over kinds exactly once per var (#14880) (813aab7)

git at git.haskell.org git at git.haskell.org
Thu Sep 13 07:56:46 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14880-2-step2-c123
Link       : http://ghc.haskell.org/trac/ghc/changeset/813aab757c400c10fe4927c23edbc6533cdf69ad/ghc

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

commit 813aab757c400c10fe4927c23edbc6533cdf69ad
Author: Tobias Dammers <tdammers at gmail.com>
Date:   Thu Sep 13 09:56:02 2018 +0200

    Close over kinds exactly once per var (#14880)


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

813aab757c400c10fe4927c23edbc6533cdf69ad
 compiler/types/TyCoRep.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 7f470ea..10f9374 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -1650,7 +1650,7 @@ ty_co_vars_of_type :: Type -> TyCoVarSet -> TyCoVarSet -> TyCoVarSet
 ty_co_vars_of_type (TyVarTy v) is acc
   | v `elemVarSet` is  = acc
   | v `elemVarSet` acc = acc
-  | otherwise          = ty_co_vars_of_type (tyVarKind v) is (extendVarSet acc v)
+  | otherwise          = ty_co_vars_of_type (tyVarKind v) emptyVarSet (extendVarSet acc v)
 ty_co_vars_of_type (TyConApp _ tys)   is acc = ty_co_vars_of_types tys is acc
 ty_co_vars_of_type (LitTy {})         _  acc = acc
 ty_co_vars_of_type (AppTy fun arg)    is acc = ty_co_vars_of_type fun is (ty_co_vars_of_type arg is acc)



More information about the ghc-commits mailing list