Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.

Commit 82e3cb3

Browse files
committed
Update core packages' versions for 8.2.2
This is the minimal update to the version numbers of the included packages, matching the core packages with what ghc 8.2.2 was built with. Changes to the includes for the full build are still under review. * hptool/src/Main.hs * Make use of the new ghc release * hptool/src/PlatformDB.hs * The deltaFrom was written for the older style HP releases when there was only "full" not core and full, so update to be useful now, and add the older style back as deltaFrom' (used only in Releases2015.hs, which is updated). * hptool/src/Releases2015.hs * Use the new deltaFrom' (which has the original functionality of deltaFrom) * hptool/src/Releases2017.hs * Add the hp_8_2_2 release, as a delta from hp_8_2_1
1 parent 398ebb4 commit 82e3cb3

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

hptool/src/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ main = hSetEncoding stdout utf8 >> shakeArgsWith opts flags main'
8888

8989
opts = shakeOptions
9090

91-
hpRelease = hp_8_2_1
91+
hpRelease = hp_8_2_2
9292
hpFullName = show $ relVersion hpRelease
9393
srcTarFile = productDir </> hpFullName <.> "tar.gz"
9494

hptool/src/PlatformDB.hs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module PlatformDB
2-
( release, releaseWithMinimal, deltaFrom,
2+
( release, releaseWithMinimal, deltaFrom, deltaFrom',
33
incGHC, incGHCLib, incGHCTool, incLib, incTool,
44
notWindows, onlyWindows,
55

@@ -30,9 +30,13 @@ releaseWithMinimal vstr minimalIncs incs = Release (HpVersion $ version vstr) mi
3030
release :: String -> [Include] -> Release
3131
release vstr incs = Release (HpVersion $ version vstr) incs []
3232

33-
-- | Construct list of Includes as a delta to packages in another release
34-
deltaFrom :: Release -> [Include] -> [Include]
35-
deltaFrom base deltas = go (allRelIncludes base) deltas
33+
-- | Construct list of Includes as a delta to packages in another release.
34+
-- The contents of the single list provided are applied to both the core and
35+
-- the full include lists (since full is just the additions to core with no
36+
-- overlap).
37+
deltaFrom :: Release -> [Include] -> ([Include], [Include])
38+
deltaFrom base deltas = ( go (relMinimalIncludes base) deltas
39+
, go (relIncludes base) deltas )
3640
where
3741
go [] dIncs = dIncs
3842
go (bInc : bIncs) dIncs =
@@ -45,6 +49,11 @@ deltaFrom base deltas = go (allRelIncludes base) deltas
4549
merge _ [updateInc] = updateInc
4650
merge bInc _ = error $ "multiple updates for package " ++ show (snd bInc)
4751

52+
-- | Like deltaFrom, but for older releases that didn't have the
53+
-- core versus full separation of included packages.
54+
deltaFrom' :: Release -> [Include] -> [Include]
55+
deltaFrom' = (fst .) . deltaFrom
56+
4857
buildInc :: IncludeType -> PackageName -> String -> Include
4958
buildInc inc name vstr = (inc, Package name $ version vstr)
5059

hptool/src/Releases2015.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ hp_7_10_2 =
111111

112112
hp_7_10_2_a :: Release
113113
hp_7_10_2_a =
114-
release "7.10.2-a" $ deltaFrom hp_7_10_2
114+
release "7.10.2-a" $ deltaFrom' hp_7_10_2
115115
[ incLib "text" "1.2.1.3"
116116
, incLib "fgl" "5.5.2.1"
117117
]

hptool/src/Releases2017.hs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PlatformDB
44
import Types
55

66
releases2017 :: [Release]
7-
releases2017 = [hp_8_2_1]
7+
releases2017 = [hp_8_2_1, hp_8_2_2]
88

99

1010
hp_8_2_1 :: Release
@@ -110,3 +110,16 @@ hp_8_2_1 =
110110
]
111111

112112
-- TO add: binary? semigroups? regexlib? safe? tagsoup? tagged? tasty? optparse-applicative? clock? criterion? reflection?
113+
114+
hp_8_2_2 :: Release
115+
hp_8_2_2 =
116+
(uncurry $ releaseWithMinimal "8.2.2") $ deltaFrom hp_8_2_1
117+
[ incGHC "8.2.2"
118+
, incGHCLib "Cabal" "2.0.1.0"
119+
, incGHCLib "base" "4.10.1.0"
120+
{- These packages are in the GHC distribution, and hence bundled with
121+
the Platform. However, they are not officially part of the Platform,
122+
and as such, do not carry the same stability guaruntees.
123+
, incGHCLib "ghc-prim" "0.5.1.1"
124+
-}
125+
]

0 commit comments

Comments
 (0)