From 05b8a21884fb3b283acb7d148afc875a95f7752c Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 18 Oct 2021 13:40:23 +0100 Subject: Make fields of GlobalRdrElt strict In order to do this I thought it was prudent to change the list type to a bag type to avoid doing a lot of premature work in plusGRE because of ++. Fixes #19201 --- compiler/GHC/Rename/Names.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/GHC/Rename/Names.hs') diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs index 7392b76c64..c3d10a9237 100644 --- a/compiler/GHC/Rename/Names.hs +++ b/compiler/GHC/Rename/Names.hs @@ -95,6 +95,7 @@ import qualified Data.Set as S import System.FilePath (()) import System.IO +import GHC.Data.Bag {- ************************************************************************ @@ -1769,7 +1770,7 @@ mkImportMap gres RealSrcLoc decl_loc _ -> Map.insertWith add decl_loc [gre] imp_map UnhelpfulLoc _ -> imp_map where - best_imp_spec = bestImport imp_specs + best_imp_spec = bestImport (bagToList imp_specs) add _ gres = gre : gres warnUnusedImport :: WarningFlag -> NameEnv (FieldLabelString, Parent) -- cgit v1.2.1