Skip to content

Commit 16ccaf6

Browse files
authored
Remove unused containers.h include from GHC 9.8.4 (#2293)
See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13709
1 parent 04202f7 commit 16ccaf6

File tree

2 files changed

+159
-0
lines changed

2 files changed

+159
-0
lines changed

overlays/bootstrap.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ in {
271271

272272
# Fix issue loading windows dll using `.dll.a` file
273273
++ onWindows (fromUntil "9.4" "9.14" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch)
274+
275+
# See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13709
276+
++ fromUntil "9.8.4" "9.8.5" ./patches/ghc/ghc-9.8.4-remove-unused-containers-h-include13709.diff
274277
;
275278
in ({
276279
ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc {
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
diff --git a/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py b/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
2+
index 6d97bda61c3037cecbe5f7fad42115927aa1a787..90b52076f37089e9bce8c1a55d49f757a6d178ff 100755
3+
--- a/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
4+
+++ b/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
5+
@@ -36,6 +36,7 @@ import os
6+
import yaml
7+
import gitlab
8+
from urllib.request import urlopen
9+
+from urllib.parse import urlparse
10+
import hashlib
11+
import sys
12+
import json
13+
@@ -80,7 +81,7 @@ source_artifact = Artifact('source-tarball'
14+
test_artifact = Artifact('source-tarball'
15+
, 'ghc-{version}-testsuite.tar.xz'
16+
, 'ghc-{version}-testsuite.tar.xz'
17+
- , 'ghc-{version}' )
18+
+ , 'ghc-{version}/testsuite' )
19+
20+
def debian(arch, n):
21+
return linux_platform(arch, "{arch}-linux-deb{n}".format(arch=arch, n=n))
22+
@@ -156,13 +157,18 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
23+
eprint(f"Bindist URL: {url}")
24+
eprint(f"Download URL: {final_url}")
25+
26+
- #Download and hash from the release pipeline, this must not change anyway during upload.
27+
+ # Download and hash from the release pipeline, this must not change anyway during upload.
28+
h = download_and_hash(url)
29+
30+
res = { "dlUri": final_url
31+
, "dlSubdir": artifact.subdir.format(version=version)
32+
- , "dlOutput": artifact.output_name.format(version=version)
33+
, "dlHash" : h }
34+
+
35+
+ # Only add dlOutput if it is inconsistent with the filename inferred from the URL
36+
+ output = artifact.output_name.format(version=version)
37+
+ if Path(urlparse(final_url).path).name != output:
38+
+ res["dlOutput"] = output
39+
+
40+
eprint(res)
41+
return res
42+
43+
diff --git a/compiler/GHC/Data/Word64Map.hs b/compiler/GHC/Data/Word64Map.hs
44+
index 3893313b5e9e79748f7595ecc1cb03c6536fa54f..b5034ca9f528d77c5571f4bd771edc5e6184d8c5 100644
45+
--- a/compiler/GHC/Data/Word64Map.hs
46+
+++ b/compiler/GHC/Data/Word64Map.hs
47+
@@ -8,7 +8,6 @@
48+
{-# LANGUAGE MonoLocalBinds #-}
49+
#endif
50+
51+
-#include "containers.h"
52+
53+
-----------------------------------------------------------------------------
54+
-- |
55+
diff --git a/compiler/GHC/Data/Word64Map/Internal.hs b/compiler/GHC/Data/Word64Map/Internal.hs
56+
index 6e60b7f5464aba8f4971ab876ccc698c2415b997..9dd92fb9efdd4b9f402cc595ca1e326bd60803dd 100644
57+
--- a/compiler/GHC/Data/Word64Map/Internal.hs
58+
+++ b/compiler/GHC/Data/Word64Map/Internal.hs
59+
@@ -14,7 +14,6 @@
60+
{-# OPTIONS_HADDOCK not-home #-}
61+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
62+
63+
-#include "containers.h"
64+
65+
-----------------------------------------------------------------------------
66+
-- |
67+
diff --git a/compiler/GHC/Data/Word64Map/Lazy.hs b/compiler/GHC/Data/Word64Map/Lazy.hs
68+
index 0df84842e2a7ce2c6aacb91c404b8a8f3f5c512e..0c09f62937f4115f50cced65f0ba3c35090c2f7b 100644
69+
--- a/compiler/GHC/Data/Word64Map/Lazy.hs
70+
+++ b/compiler/GHC/Data/Word64Map/Lazy.hs
71+
@@ -3,7 +3,6 @@
72+
{-# LANGUAGE Safe #-}
73+
#endif
74+
75+
-#include "containers.h"
76+
77+
-----------------------------------------------------------------------------
78+
-- |
79+
diff --git a/compiler/GHC/Data/Word64Map/Strict.hs b/compiler/GHC/Data/Word64Map/Strict.hs
80+
index 4de68d7f7c39560fffd7c5935042446311054574..ab7c1471fba741ab070f3ee47a0e13ccd7b615d1 100644
81+
--- a/compiler/GHC/Data/Word64Map/Strict.hs
82+
+++ b/compiler/GHC/Data/Word64Map/Strict.hs
83+
@@ -4,8 +4,6 @@
84+
{-# LANGUAGE Trustworthy #-}
85+
#endif
86+
87+
-#include "containers.h"
88+
-
89+
-----------------------------------------------------------------------------
90+
-- |
91+
-- Module : Data.Word64Map.Strict
92+
diff --git a/compiler/GHC/Data/Word64Map/Strict/Internal.hs b/compiler/GHC/Data/Word64Map/Strict/Internal.hs
93+
index 1605565c9fd7a527fac61dbf162ce0a805f4f920..d998e6b6a9778e4aa3750d01b8b38a7a3eb6f104 100644
94+
--- a/compiler/GHC/Data/Word64Map/Strict/Internal.hs
95+
+++ b/compiler/GHC/Data/Word64Map/Strict/Internal.hs
96+
@@ -4,8 +4,6 @@
97+
98+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
99+
100+
-#include "containers.h"
101+
-
102+
-----------------------------------------------------------------------------
103+
-- |
104+
-- Module : Data.Word64Map.Strict.Internal
105+
diff --git a/compiler/GHC/Data/Word64Set.hs b/compiler/GHC/Data/Word64Set.hs
106+
index 81cfcbd4efbab00fc203a5da905c0c0ccd9abb11..3c5c047d948e339de596d0fc729ae0534a229b7a 100644
107+
--- a/compiler/GHC/Data/Word64Set.hs
108+
+++ b/compiler/GHC/Data/Word64Set.hs
109+
@@ -3,8 +3,6 @@
110+
{-# LANGUAGE Safe #-}
111+
#endif
112+
113+
-#include "containers.h"
114+
-
115+
-----------------------------------------------------------------------------
116+
-- |
117+
-- Module : Data.Word64Set
118+
diff --git a/compiler/GHC/Data/Word64Set/Internal.hs b/compiler/GHC/Data/Word64Set/Internal.hs
119+
index b2df095adfb1f363ed0fdfebc1516c5b699b8106..569c312840a4bd8cadefb05a0e29210eef75d2c5 100644
120+
--- a/compiler/GHC/Data/Word64Set/Internal.hs
121+
+++ b/compiler/GHC/Data/Word64Set/Internal.hs
122+
@@ -12,8 +12,6 @@
123+
124+
{-# OPTIONS_HADDOCK not-home #-}
125+
126+
-#include "containers.h"
127+
-
128+
-----------------------------------------------------------------------------
129+
-- |
130+
-- Module : Data.Word64Set.Internal
131+
diff --git a/compiler/GHC/Utils/Containers/Internal/BitUtil.hs b/compiler/GHC/Utils/Containers/Internal/BitUtil.hs
132+
index b7484cfc2e07b00b717e64f507aed0779c39f649..3d938b64e434ccdd4de7fbb0aa6c1651d911ee27 100644
133+
--- a/compiler/GHC/Utils/Containers/Internal/BitUtil.hs
134+
+++ b/compiler/GHC/Utils/Containers/Internal/BitUtil.hs
135+
@@ -6,8 +6,6 @@
136+
{-# LANGUAGE Safe #-}
137+
#endif
138+
139+
-#include "containers.h"
140+
-
141+
-----------------------------------------------------------------------------
142+
-- |
143+
-- Module : Utils.Containers.Internal.BitUtil
144+
diff --git a/compiler/GHC/Utils/Containers/Internal/StrictPair.hs b/compiler/GHC/Utils/Containers/Internal/StrictPair.hs
145+
index 65d3780ef071f2b9fc2f4b3ff5502314f6426abd..9a2cf89ca20588c7ecd919072d328673f7888828 100644
146+
--- a/compiler/GHC/Utils/Containers/Internal/StrictPair.hs
147+
+++ b/compiler/GHC/Utils/Containers/Internal/StrictPair.hs
148+
@@ -3,8 +3,6 @@
149+
{-# LANGUAGE Safe #-}
150+
#endif
151+
152+
-#include "containers.h"
153+
-
154+
-- | A strict pair
155+
156+
module GHC.Utils.Containers.Internal.StrictPair (StrictPair(..), toPair) where

0 commit comments

Comments
 (0)