Skip to content

Commit

Permalink
Add support for summoning GHC 9.2.8 and 9.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
noughtmare committed Jun 18, 2023
1 parent 30b5604 commit 13accba
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions summoner-cli/src/Summoner/GhcVer.hs
Expand Up @@ -37,6 +37,8 @@ data GhcVer
| Ghc884
| Ghc8107
| Ghc902
| Ghc928
| Ghc945
deriving stock (Eq, Ord, Show, Enum, Bounded)

-- | Converts 'GhcVer' into dot-separated string.
Expand All @@ -49,6 +51,8 @@ showGhcVer = \case
Ghc884 -> "8.8.4"
Ghc8107 -> "8.10.7"
Ghc902 -> "9.0.2"
Ghc928 -> "9.2.8"
Ghc945 -> "9.4.5"

{- | These are old GHC versions that are not working with default GHC versions
when using Stack.
Expand All @@ -67,8 +71,10 @@ latestLts = \case
Ghc844 -> "lts-12.26"
Ghc865 -> "lts-14.27"
Ghc884 -> "lts-16.31"
Ghc8107 -> "lts-18.21"
Ghc902 -> "nightly-2022-01-10"
Ghc8107 -> "lts-18.28"
Ghc902 -> "lts-19.33"
Ghc928 -> "lts-20.25"
Ghc945 -> "nightly-2023-06-18"

-- | Represents PVP versioning (4 numbers).
data Pvp = Pvp
Expand All @@ -92,6 +98,8 @@ baseVerPvp = \case
Ghc884 -> Pvp 4 13 0 0
Ghc8107 -> Pvp 4 14 3 0
Ghc902 -> Pvp 4 15 1 0
Ghc928 -> Pvp 4 16 4 0
Ghc945 -> Pvp 4 17 0 0

-- | Returns corresponding @base@ version of the given GHC version.
baseVer :: GhcVer -> Text
Expand Down

0 comments on commit 13accba

Please sign in to comment.