summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-24 15:54:29 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-29 09:44:40 -0400
commit7c90a1804d25c77e829546f5d744f92f3c840a77 (patch)
tree1ae086be792b95322dee65497538297b2617c84d /compiler/GHC/Tc
parent1f2ba67a07c1f94c0232952eb3af184a0962e881 (diff)
downloadhaskell-7c90a1804d25c77e829546f5d744f92f3c840a77.tar.gz
compiler: Rename nameEnvElts -> nonDetNameEnvElts
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r--compiler/GHC/Tc/Gen/HsType.hs2
-rw-r--r--compiler/GHC/Tc/TyCl/Utils.hs6
-rw-r--r--compiler/GHC/Tc/Utils/Backpack.hs2
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs
index 8628f75d99..dd31ef586d 100644
--- a/compiler/GHC/Tc/Gen/HsType.hs
+++ b/compiler/GHC/Tc/Gen/HsType.hs
@@ -1055,7 +1055,7 @@ tc_infer_hs_type _ (XHsType ty)
-- Raw uniques since we go from NameEnv to TvSubstEnv.
let subst_prs :: [(Unique, TcTyVar)]
subst_prs = [ (getUnique nm, tv)
- | ATyVar nm tv <- nameEnvElts (tcl_env env) ]
+ | ATyVar nm tv <- nonDetNameEnvElts (tcl_env env) ]
subst = mkTvSubst
(mkInScopeSet $ mkVarSet $ map snd subst_prs)
(listToUFM_Directly $ map (liftSnd mkTyVarTy) subst_prs)
diff --git a/compiler/GHC/Tc/TyCl/Utils.hs b/compiler/GHC/Tc/TyCl/Utils.hs
index 1cb3555f35..b7d47d57d8 100644
--- a/compiler/GHC/Tc/TyCl/Utils.hs
+++ b/compiler/GHC/Tc/TyCl/Utils.hs
@@ -92,11 +92,11 @@ import Control.Monad
-}
synonymTyConsOfType :: Type -> [TyCon]
--- Does not look through type synonyms at all
--- Return a list of synonym tycons
+-- Does not look through type synonyms at all.
+-- Returns a list of synonym tycons in nondeterministic order.
-- Keep this synchronized with 'expandTypeSynonyms'
synonymTyConsOfType ty
- = nameEnvElts (go ty)
+ = nonDetNameEnvElts (go ty)
where
go :: Type -> NameEnv TyCon -- The NameEnv does duplicate elim
go (TyConApp tc tys) = go_tc tc `plusNameEnv` go_s tys
diff --git a/compiler/GHC/Tc/Utils/Backpack.hs b/compiler/GHC/Tc/Utils/Backpack.hs
index a2599c3a57..bb0140d5e8 100644
--- a/compiler/GHC/Tc/Utils/Backpack.hs
+++ b/compiler/GHC/Tc/Utils/Backpack.hs
@@ -157,7 +157,7 @@ checkHsigIface tcg_env gr sig_iface
-- have to look up the right name.
sig_type_occ_env = mkOccEnv
. map (\t -> (nameOccName (getName t), t))
- $ nameEnvElts sig_type_env
+ $ nonDetNameEnvElts sig_type_env
dfun_names = map getName sig_insts
check_export name
-- Skip instances, we'll check them later