Skip to content

Commit 8960056

Browse files
committed
WIP
1 parent 372179b commit 8960056

File tree

4 files changed

+45
-6
lines changed

4 files changed

+45
-6
lines changed

fixtures/doctest-version.github

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ jobs:
417417
- name: cache (tools)
418418
uses: actions/cache/restore@v4
419419
with:
420-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-af17a32a
420+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-58bfb495
421421
path: ~/.haskell-ci-tools
422422
- name: install cabal-plan
423423
run: |
@@ -436,7 +436,7 @@ jobs:
436436
if: always()
437437
uses: actions/cache/save@v4
438438
with:
439-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-af17a32a
439+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-58bfb495
440440
path: ~/.haskell-ci-tools
441441
- name: checkout
442442
uses: actions/checkout@v4

fixtures/doctest.github

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ jobs:
417417
- name: cache (tools)
418418
uses: actions/cache/restore@v4
419419
with:
420-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-761cb1ae
420+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-ae4cd18b
421421
path: ~/.haskell-ci-tools
422422
- name: install cabal-plan
423423
run: |
@@ -436,7 +436,7 @@ jobs:
436436
if: always()
437437
uses: actions/cache/save@v4
438438
with:
439-
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-761cb1ae
439+
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-ae4cd18b
440440
path: ~/.haskell-ci-tools
441441
- name: checkout
442442
uses: actions/checkout@v4

src/HaskellCI/Config/History.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ configHistory =
4141
, ver 0 19 2024114 := \cfg -> cfg
4242
& field @"cfgSetupMethods" .~ PerSetupMethod
4343
{ hvrPpa = C.noVersion
44-
, ghcup = invertVersionRange (C.withinVersion (C.mkVersion [9,8,3])) /\ C.earlierVersion (C.mkVersion [9,12,0])
44+
, ghcup = invertVersionRange (C.withinVersion (C.mkVersion [9,8,3])) /\ C.earlierVersion (C.mkVersion [9,12])
4545
, ghcupVanilla = C.withinVersion (C.mkVersion [9,8,3])
46-
, ghcupPrerelease = C.orLaterVersion (C.mkVersion [9,12,0])
46+
, ghcupPrerelease = C.orLaterVersion (C.mkVersion [9,12])
4747
}
4848
]
4949
where

src/HaskellCI/SetupMethod.hs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{-# LANGUAGE OverloadedStrings #-}
2+
module HaskellCI.SetupMethod where
3+
4+
import HaskellCI.Prelude
5+
import HaskellCI.YamlSyntax
6+
7+
data SetupMethod
8+
= HVRPPA
9+
| GHCUP
10+
| GHCUPvanilla
11+
| GHCUPprerelease
12+
deriving (Eq, Ord, Show, Enum, Bounded)
13+
14+
instance ToYaml SetupMethod where
15+
toYaml HVRPPA = "hvrppa"
16+
toYaml GHCUP = "ghcup"
17+
toYaml GHCUPvanilla = "ghcup-vanilla"
18+
toYaml GHCUPprerelease = "ghcup-prerelease"
19+
20+
data PerSetupMethod a = PerSetupMethod
21+
{ hvrPpa :: a
22+
, ghcup :: a
23+
, ghcupVanilla :: a
24+
, ghcupPrerelease :: a
25+
}
26+
deriving (Show, Generic, Binary, Functor, Foldable, Traversable)
27+
28+
instance Representable SetupMethod PerSetupMethod where
29+
index f HVRPPA = hvrPpa f
30+
index f GHCUP = ghcup f
31+
index f GHCUPvanilla = ghcupVanilla f
32+
index f GHCUPprerelease = ghcupPrerelease f
33+
34+
tabulate f = PerSetupMethod
35+
{ hvrPpa = f HVRPPA
36+
, ghcup = f GHCUP
37+
, ghcupVanilla = f GHCUPvanilla
38+
, ghcupPrerelease = f GHCUPprerelease
39+
}

0 commit comments

Comments
 (0)