diff options
author | Bartosz Nitka <niteria@gmail.com> | 2016-06-07 07:19:30 -0700 |
---|---|---|
committer | Bartosz Nitka <niteria@gmail.com> | 2016-06-07 08:23:37 -0700 |
commit | 5db93d2e567ecb7169b06097244361327ec1eb2a (patch) | |
tree | 5032e35eaf6895baf9a0bf5f6a43fe7a21a9120a /compiler/main | |
parent | 3b698e8938ccfa3e0dbf192abf4984d6937a196e (diff) | |
download | haskell-5db93d2e567ecb7169b06097244361327ec1eb2a.tar.gz |
Make vectInfoParallelVars a DVarSet
We dump it in the interface file, so we need to do it in a
deterministic order. I haven't seen any problems with this
during my testing, but that's probably because it's unused.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2313
GHC Trac Issues: #4012
Diffstat (limited to 'compiler/main')
-rw-r--r-- | compiler/main/HscTypes.hs | 6 | ||||
-rw-r--r-- | compiler/main/TidyPgm.hs | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/compiler/main/HscTypes.hs b/compiler/main/HscTypes.hs index 79e5f694cf..a5eee7c5d8 100644 --- a/compiler/main/HscTypes.hs +++ b/compiler/main/HscTypes.hs @@ -2642,7 +2642,7 @@ data VectInfo { vectInfoVar :: VarEnv (Var , Var ) -- ^ @(f, f_v)@ keyed on @f@ , vectInfoTyCon :: NameEnv (TyCon , TyCon) -- ^ @(T, T_v)@ keyed on @T@ , vectInfoDataCon :: NameEnv (DataCon, DataCon) -- ^ @(C, C_v)@ keyed on @C@ - , vectInfoParallelVars :: VarSet -- ^ set of parallel variables + , vectInfoParallelVars :: DVarSet -- ^ set of parallel variables , vectInfoParallelTyCons :: NameSet -- ^ set of parallel type constructors } @@ -2673,14 +2673,14 @@ data IfaceVectInfo noVectInfo :: VectInfo noVectInfo - = VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyVarSet emptyNameSet + = VectInfo emptyVarEnv emptyNameEnv emptyNameEnv emptyDVarSet emptyNameSet plusVectInfo :: VectInfo -> VectInfo -> VectInfo plusVectInfo vi1 vi2 = VectInfo (vectInfoVar vi1 `plusVarEnv` vectInfoVar vi2) (vectInfoTyCon vi1 `plusNameEnv` vectInfoTyCon vi2) (vectInfoDataCon vi1 `plusNameEnv` vectInfoDataCon vi2) - (vectInfoParallelVars vi1 `unionVarSet` vectInfoParallelVars vi2) + (vectInfoParallelVars vi1 `unionDVarSet` vectInfoParallelVars vi2) (vectInfoParallelTyCons vi1 `unionNameSet` vectInfoParallelTyCons vi2) concatVectInfo :: [VectInfo] -> VectInfo diff --git a/compiler/main/TidyPgm.hs b/compiler/main/TidyPgm.hs index 401f939d44..daf3d00584 100644 --- a/compiler/main/TidyPgm.hs +++ b/compiler/main/TidyPgm.hs @@ -493,11 +493,12 @@ tidyVectInfo (_, var_env) info@(VectInfo { vectInfoVar = vars , isDataConWorkId var || not (isImplicitId var) ] - tidy_parallelVars = mkVarSet [ tidy_var - | var <- varSetElems parallelVars - , let tidy_var = lookup_var var - , isExternalId tidy_var && isExportedId tidy_var - ] + tidy_parallelVars = mkDVarSet + [ tidy_var + | var <- dVarSetElems parallelVars + , let tidy_var = lookup_var var + , isExternalId tidy_var && isExportedId tidy_var + ] lookup_var var = lookupWithDefaultVarEnv var_env var var |