summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface
diff options
context:
space:
mode:
authorWander Hillen <wjw.hillen@gmail.com>2020-09-12 16:06:04 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-19 15:48:41 -0400
commite195dae6d959e2a9b1a22a2ca78db5955e1d7dea (patch)
tree9ea82263c4a60c915ff93b9a3643245fbb8f2a46 /compiler/GHC/Iface
parentac213d267140e747a391f68bc9f060e117395547 (diff)
downloadhaskell-e195dae6d959e2a9b1a22a2ca78db5955e1d7dea.tar.gz
Export singleton function from Data.List
Data.OldList exports a monomorphized singleton function but it is not re-exported by Data.List. Adding the export to Data.List causes a conflict with a 14-year old function of the same name and type by SPJ in GHC.Utils.Misc. We can't just remove this function because that leads to a problems when building GHC with a stage0 compiler that does not have singleton in Data.List yet. We also can't hide the function in GHC.Utils.Misc since it is not possible to hide a function from a module if the module does not export the function. To work around this, all places where the Utils.Misc singleton was used now use a qualified version like Utils.singleton and in GHC.Utils.Misc we are very specific about which version we export.
Diffstat (limited to 'compiler/GHC/Iface')
-rw-r--r--compiler/GHC/Iface/Recomp.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index 7e72633622..eca2d2c875 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -37,7 +37,7 @@ import GHC.Data.Graph.Directed
import GHC.Types.SrcLoc
import GHC.Utils.Outputable as Outputable
import GHC.Types.Unique
-import GHC.Utils.Misc hiding ( eqListBy )
+import GHC.Utils.Misc as Utils hiding ( eqListBy )
import GHC.Data.Maybe
import GHC.Data.FastString
import GHC.Utils.Binary
@@ -1339,7 +1339,7 @@ mkOrphMap get_key decls
where
go (non_orphs, orphs) d
| NotOrphan occ <- get_key d
- = (extendOccEnv_Acc (:) singleton non_orphs occ d, orphs)
+ = (extendOccEnv_Acc (:) Utils.singleton non_orphs occ d, orphs)
| otherwise = (non_orphs, d:orphs)
-- -----------------------------------------------------------------------------