[commit: ghc] master: Kill varSetElems in checkValidInferredKinds (c148212)

git at git.haskell.org git at git.haskell.org
Tue Jun 7 13:54:52 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c1482127ded4479e2ac698851b1545887c2aedf0/ghc

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

commit c1482127ded4479e2ac698851b1545887c2aedf0
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Tue Jun 7 06:53:14 2016 -0700

    Kill varSetElems in checkValidInferredKinds
    
    It's only used for producing an error message here
    
    GHC Trac: #4012


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

c1482127ded4479e2ac698851b1545887c2aedf0
 compiler/typecheck/TcValidity.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index 83f64f3..f137d1e 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -49,6 +49,7 @@ import FamInst     ( makeInjectivityErrors )
 import Name
 import VarEnv
 import VarSet
+import UniqFM
 import Var         ( mkTyVar )
 import ErrUtils
 import DynFlags
@@ -1863,7 +1864,9 @@ checkValidInferredKinds orig_kvs out_of_scope extra
 
   where
     (env1, _) = tidyTyCoVarBndrs emptyTidyEnv orig_kvs
-    (env, _)  = tidyTyCoVarBndrs env1         (varSetElems out_of_scope)
+    (env, _)  = tidyTyCoVarBndrs env1         (nonDetEltsUFM out_of_scope)
+      -- It's OK to use nonDetEltsUFM here because it's only used for
+      -- generating the error message
 
 {-
 ************************************************************************



More information about the ghc-commits mailing list