Skip to content

Commit c00dbc7

Browse files
authored
Merge pull request #479 from tweag/tbagrel1/bump-ghc-9.6
Bump nixpkgs, bump GHC to 9.6.6 and stackage to LTS 22.34
2 parents a8f34ba + 5e85ae9 commit c00dbc7

File tree

11 files changed

+126
-117
lines changed

11 files changed

+126
-117
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ on: [push, pull_request]
33
env:
44
# Bump this number to invalidate the Github-actions cache
55
cache-invalidation-key: 0
6-
nixpkgs-url: https://github.com/NixOS/nixpkgs/archive/b2737d4980a17cc2b7d600d7d0b32fd7333aca88.tar.gz
6+
nixpkgs-url: https://github.com/NixOS/nixpkgs/archive/574d1eac1c200690e27b8eb4e24887f8df7ac27c.tar.gz
77

88
jobs:
99
cabal-test:
1010
name: cabal test - GHC ${{ matrix.ghc-version }}
1111
strategy:
1212
matrix:
13-
ghc-version: [944, 961]
13+
ghc-version: [96, 98, 910]
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
@@ -27,19 +27,19 @@ jobs:
2727
key: cabal-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-${{ matrix.ghc-version }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('linear-base.cabal') }}-${{ github.sha }}
2828
restore-keys: cabal-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-${{ matrix.ghc-version }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('linear-base.cabal') }}-
2929
- name: Build Nix dependencies
30-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "echo '=== Nix dependencies installed ==='"
30+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "echo '=== Nix dependencies installed ==='"
3131
- name: Init Cabal's config file
32-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal --config-file=/home/runner/.cabal/config user-config -f init"
32+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal --config-file=/home/runner/.cabal/config user-config -f init"
3333
- name: Update Cabal's database
34-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal update"
34+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal update"
3535
- name: Build Cabal's dependencies
36-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks --dependencies-only"
36+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks --dependencies-only"
3737
- name: Build
38-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks"
38+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks"
3939
- name: Haddock
40-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run "cabal --allow-newer haddock"
40+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal --allow-newer haddock"
4141
- name: cabal-docspec
42-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --pure --run cabal-docspec
42+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run cabal-docspec
4343

4444
ormolu:
4545
name: check formatting with ormolu
@@ -56,9 +56,9 @@ jobs:
5656
key: stack-deps-ormolu-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock') }}-${{ github.sha }}
5757
restore-keys: stack-deps-ormolu-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock') }}-
5858
- name: Build Nix dependencies
59-
run: nix-shell --pure --run "echo '=== Nix dependencies installed ==='"
59+
run: nix-shell --arg installHls 'false' --pure --run "echo '=== Nix dependencies installed ==='"
6060
- name: check formatting
61-
run: nix-shell --pure --run 'stack build ormolu && stack exec ormolu -- -m check $(find . -type f -name "*.hs-boot" -o -name "*.hs")'
61+
run: nix-shell --arg installHls 'false' --pure --run 'stack build ormolu && stack exec ormolu -- -m check $(find . -type f -name "*.hs-boot" -o -name "*.hs")'
6262

6363
stack-build:
6464
name: stack build
@@ -75,6 +75,6 @@ jobs:
7575
key: stack-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock', 'linear-base.cabal') }}-${{ github.sha }}
7676
restore-keys: stack-deps-${{ runner.os }}-${{ hashFiles('nix/sources.json') }}-v${{ env.cache-invalidation-key }}-${{ hashFiles('stack.yaml.lock', 'linear-base.cabal') }}-
7777
- name: Build Nix dependencies
78-
run: nix-shell --pure --run "echo '=== Nix dependencies installed ==='"
78+
run: nix-shell --arg installHls 'false' --pure --run "echo '=== Nix dependencies installed ==='"
7979
- name: Build
80-
run: nix-shell --pure --run "stack build --pedantic --test --bench --no-run-benchmarks"
80+
run: nix-shell --arg installHls 'false' --pure --run "stack build --pedantic --test --bench --no-run-benchmarks"

cabal.project

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
packages: *.cabal
2-
3-
tests: true
4-
5-
package linear-base
6-
ghc-options: -Wall

linear-base.cabal

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,26 @@ source-repository head
2121
type: git
2222
location: https://github.com/tweag/linear-base
2323

24-
common warnings
25-
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances
24+
common build-opts
25+
ghc-options: -O2 -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances
2626
-- Additional warnings we may consider adding:
2727
-- * -Wredundant-constraints : would need deactivating in the modules which use Nat
28+
common rts-opts-multithread
29+
ghc-options: -threaded -rtsopts "-with-rtsopts=-N"
30+
common rts-opts-monothread-stats
31+
ghc-options: -rtsopts "-with-rtsopts=-T"
2832

2933
library
30-
import: warnings
34+
import: build-opts
35+
hs-source-dirs: src
36+
if impl(ghc >= 9.4.0)
37+
hs-source-dirs: src-version-changes/ghc94/after
38+
else
39+
hs-source-dirs: src-version-changes/ghc94/before
40+
if impl(ghc >= 9.6.0)
41+
hs-source-dirs: src-version-changes/ghc96/after
42+
else
43+
hs-source-dirs: src-version-changes/ghc96/before
3144
exposed-modules:
3245
Control.Monad.IO.Class.Linear
3346
Control.Functor.Linear
@@ -118,20 +131,8 @@ library
118131
System.IO.Resource.Linear
119132
System.IO.Resource.Linear.Internal
120133
Unsafe.Linear
121-
122-
hs-source-dirs: src
123-
if impl(ghc >= 9.4.0)
124-
hs-source-dirs: src-version-changes/ghc94/after
125-
else
126-
hs-source-dirs: src-version-changes/ghc94/before
127-
if impl(ghc >= 9.6.0)
128-
hs-source-dirs: src-version-changes/ghc96/after
129-
else
130-
hs-source-dirs: src-version-changes/ghc96/before
131-
132134
default-language: Haskell2010
133135
build-depends:
134-
135136
base >=4.16 && <5,
136137
containers,
137138
ghc-prim,
@@ -145,7 +146,8 @@ library
145146
primitive
146147

147148
test-suite test
148-
import: warnings
149+
import: build-opts
150+
import: rts-opts-multithread
149151
type: exitcode-stdio-1.0
150152
main-is: Main.hs
151153
hs-source-dirs: test
@@ -158,9 +160,7 @@ test-suite test
158160
Test.Data.Polarized
159161
Test.Data.V
160162
Test.Data.Replicator
161-
162163
default-language: Haskell2010
163-
ghc-options: -threaded -rtsopts -with-rtsopts=-N
164164
build-depends:
165165
inspection-testing,
166166
tasty-inspection-testing,
@@ -174,7 +174,8 @@ test-suite test
174174
vector
175175

176176
test-suite examples
177-
import: warnings
177+
import: build-opts
178+
import: rts-opts-multithread
178179
type: exitcode-stdio-1.0
179180
main-is: Main.hs
180181
hs-source-dirs: examples
@@ -189,9 +190,7 @@ test-suite examples
189190
Simple.Quicksort
190191
Simple.TopSort
191192
Generic.Traverse
192-
193193
default-language: Haskell2010
194-
ghc-options: -threaded -rtsopts -with-rtsopts=-N
195194
build-depends:
196195
base,
197196
linear-base,
@@ -204,14 +203,14 @@ test-suite examples
204203
linear-generics
205204

206205
benchmark mutable-data
207-
import: warnings
206+
import: build-opts
207+
import: rts-opts-monothread-stats
208208
type: exitcode-stdio-1.0
209209
main-is: Main.hs
210210
hs-source-dirs: bench
211211
other-modules:
212212
Data.Mutable.HashMap
213213
Data.Mutable.Array
214-
215214
default-language: Haskell2010
216215
build-depends:
217216
base,

nix/cabal-docspec.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ pkgs.stdenv.mkDerivation {
44
name = "cabal-docspec";
55

66
src = pkgs.fetchurl {
7-
url = "https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20230406/cabal-docspec-0.0.0.20230406-x86_64-linux.xz";
8-
sha256 = "68fa9addd5dc453d533a74a763950499d4593b1297c9a05c3ea5bd1acc04c9dd";
7+
url = "https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz";
8+
sha256 = "48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76";
99
};
1010

1111
phases = ["installPhase"];

nix/sources.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"homepage": "https://github.com/nmattia/niv",
66
"owner": "nmattia",
77
"repo": "niv",
8-
"rev": "5830a4dd348d77e39a0f3c4c762ff2663b602d4c",
9-
"sha256": "1d3lsrqvci4qz2hwjrcnd8h5vfkg8aypq3sjd4g3izbc8frwz5sm",
8+
"rev": "f7c538837892dd2eb83567c9f380a11efb59b53f",
9+
"sha256": "0xl33k24vfc29cg9lnp95kvcq69qbq5fzb7jk9ig4lgrhaarh651",
1010
"type": "tarball",
11-
"url": "https://github.com/nmattia/niv/archive/5830a4dd348d77e39a0f3c4c762ff2663b602d4c.tar.gz",
11+
"url": "https://github.com/nmattia/niv/archive/f7c538837892dd2eb83567c9f380a11efb59b53f.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"nixpkgs": {
@@ -17,10 +17,10 @@
1717
"homepage": "https://github.com/NixOS/nixpkgs",
1818
"owner": "NixOS",
1919
"repo": "nixpkgs",
20-
"rev": "052eabdcb15dff97a742b3a43fda1fe4ce305275",
21-
"sha256": "0jbaqgpznaaxn4i4s3ixw802sfl6ppjimp0jzkqs43r1zrfsiszy",
20+
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
21+
"sha256": "0s6h7r9jin9sd8l85hdjwl3jsvzkddn3blggy78w4f21qa3chymz",
2222
"type": "tarball",
23-
"url": "https://github.com/NixOS/nixpkgs/archive/052eabdcb15dff97a742b3a43fda1fe4ce305275.tar.gz",
23+
"url": "https://github.com/NixOS/nixpkgs/archive/574d1eac1c200690e27b8eb4e24887f8df7ac27c.tar.gz",
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
}
2626
}

0 commit comments

Comments
 (0)