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

Commit bb5245a

Browse files
authored
Merge pull request #294 from randen/win822
Update core packages' versions for 8.2.2; plus minor things
2 parents 330be7b + 82e3cb3 commit bb5245a

File tree

6 files changed

+36
-9
lines changed

6 files changed

+36
-9
lines changed

hptool/hptool.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Executable hptool
1818
GhcDist,
1919
HaddockMaster,
2020
LocalCommand,
21-
Main,
2221
OS,
2322
OS.Internal,
2423
OS.Mac,

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/OS/Win.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import Development.Shake.FilePath
1515
import qualified Distribution.InstalledPackageInfo as C
1616
#endif
1717
import qualified Distribution.Package as C
18+
#if MIN_VERSION_Cabal(2,0,0)
19+
import qualified Distribution.Text as C ( display )
20+
#endif
1821

1922
import Dirs
2023
import LocalCommand
@@ -26,7 +29,10 @@ import Paths
2629
import Types
2730
import Utils
2831

29-
#if MIN_VERSION_Cabal(1,24,0)
32+
#if MIN_VERSION_Cabal(2,0,0)
33+
getPkgId :: C.HasUnitId pkg => pkg -> String
34+
getPkgId pkg = C.display $ C.installedUnitId pkg
35+
#elif MIN_VERSION_Cabal(1,24,0)
3036
getPkgId :: C.HasUnitId pkg => pkg -> String
3137
getPkgId pkg = case C.installedUnitId pkg of
3238
C.SimpleUnitId (C.ComponentId s) -> s

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)