[commit: ghc] wip/T14880-2-step2: Fix closeOverKinds to use unclosed sets internally (f3dd2ff)

git at git.haskell.org git at git.haskell.org
Mon Sep 17 20:34:25 UTC 2018


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

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

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

commit f3dd2ff01cb2e5731cd5bcae00580754817508cd
Author: Tobias Dammers <tdammers at gmail.com>
Date:   Thu Sep 13 08:50:41 2018 +0200

    Fix closeOverKinds to use unclosed sets internally


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

f3dd2ff01cb2e5731cd5bcae00580754817508cd
 compiler/types/TyCoRep.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 2823280..1f33ca6 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -1899,7 +1899,9 @@ coVarsOfCos = mapUnionVarSet coVarsOfCo
 -- Returns a non-deterministic set.
 closeOverKinds :: TyVarSet -> TyVarSet
 closeOverKinds tvs =
-  mapUnionVarSetSet (tyCoVarsOfType . tyVarKind) tvs `unionVarSet` tvs
+  mapUnionVarSetSet (tvs_of_type . tyVarKind) tvs `unionVarSet` tvs
+  where
+    tvs_of_type ts = ty_co_vars_of_type ts emptyVarSet emptyVarSet
 
 -- | Given a list of tyvars returns a deterministic FV computation that
 -- returns the given tyvars with the kind variables free in the kinds of the



More information about the ghc-commits mailing list