Skip to content

Commit 35af1b3

Browse files
authored
Merge pull request #53 from reflex-frp/aa/ghc96
Add support for ghc 9.6
2 parents ba4a1d4 + 6fd58c2 commit 35af1b3

File tree

8 files changed

+64
-12
lines changed

8 files changed

+64
-12
lines changed

.github/workflows/haskell.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.3']
10+
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.5', '9.6.1']
1111
os: ['ubuntu-latest', 'macos-latest']
1212
runs-on: ${{ matrix.os }}
1313

1414
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: haskell/actions/setup@v1
16+
- uses: actions/checkout@v3
17+
- uses: haskell/actions/setup@v2
1818
with:
1919
ghc-version: ${{ matrix.ghc }}
20+
cabal-version: '3.10.1.0'
2021
- name: Cache
2122
uses: actions/cache@v3
2223
env:
@@ -37,5 +38,7 @@ jobs:
3738
- name: Run tests
3839
# We don't run hlint tests, because different versions of hlint have different suggestions, and we don't want to worry about satisfying them all.
3940
run: cabal test --enable-tests -f-hlint all
40-
- name: Build Docs
41+
- if: matrix.ghc != '8.4.4'
42+
# docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs
43+
name: Build Docs
4144
run: cabal haddock

ChangeLog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Revision history for patch
22

3+
## 0.0.8.2
4+
5+
* Add support for GHC 9.6
6+
37
## 0.0.8.1
48

59
* Add support for GHC 9.2 and 9.4

nixpkgs/default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# DO NOT HAND-EDIT THIS FILE
2+
import (import ./thunk.nix)

nixpkgs/github.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"owner": "NixOS",
3+
"repo": "nixpkgs",
4+
"branch": "nixpkgs-unstable",
5+
"private": false,
6+
"rev": "c7eb65213bd7d95eafb8c5e2e181f04da103d054",
7+
"sha256": "1glf6j13hbwi459qrc8kkkhfw27a08vdg17sr3zwhadg4bkxz5ia"
8+
}

nixpkgs/thunk.nix

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# DO NOT HAND-EDIT THIS FILE
2+
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3+
if !fetchSubmodules && !private then builtins.fetchTarball {
4+
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5+
} else (import (builtins.fetchTarball {
6+
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7+
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8+
}) {}).fetchFromGitHub {
9+
inherit owner repo rev sha256 fetchSubmodules private;
10+
};
11+
json = builtins.fromJSON (builtins.readFile ./github.json);
12+
in fetch json

patch.cabal

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: patch
2-
Version: 0.0.8.1
2+
Version: 0.0.8.2
33
Synopsis: Data structures for describing changes to other data structures.
44
Description:
55
Data structures for describing changes to other data structures.
@@ -22,7 +22,7 @@ extra-source-files:
2222
ChangeLog.md
2323

2424
tested-with:
25-
GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.3
25+
GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1
2626
GHCJS ==8.6 || ==8.10
2727

2828
flag split-these
@@ -37,19 +37,19 @@ flag hlint
3737
library
3838
hs-source-dirs: src
3939
default-language: Haskell2010
40-
build-depends: base >= 4.9 && < 4.18
40+
build-depends: base >= 4.9 && < 4.19
4141
, constraints-extras >= 0.3 && < 0.5
4242
, commutative-semigroups >= 0.0 && < 0.2
4343
, containers >= 0.6 && < 0.7
4444
, dependent-map >= 0.3 && < 0.5
4545
, dependent-sum >= 0.6 && < 0.8
4646
, lens >= 4.7 && < 5.3
4747
, indexed-traversable >= 0.1 && < 0.2
48-
, semigroupoids >= 4.0 && < 6
48+
, semigroupoids >= 4.0 && < 7
4949
, transformers >= 0.5.6.0 && < 0.7
5050
, witherable >= 0.3 && < 0.5
5151

52-
if impl(ghc < 8.6) -- really, if base < 8.12
52+
if impl(ghc < 8.6)
5353
build-depends: base-orphans >= 0.8 && < 0.9
5454

5555
exposed-modules: Data.Functor.Misc
@@ -69,8 +69,8 @@ library
6969
default-extensions: PolyKinds
7070

7171
if flag(split-these)
72-
build-depends: these >= 1 && <1.2
73-
, semialign >=1 && <1.3
72+
build-depends: these >= 1 && <1.3
73+
, semialign >=1 && <1.4
7474
, monoidal-containers >= 0.6 && < 0.7
7575
else
7676
build-depends: these >= 0.4 && <0.9
@@ -90,6 +90,9 @@ test-suite tests
9090
buildable: False
9191

9292
test-suite hlint
93+
-- hlint doesn't support ghc-9.6 yet (as of version 3.5)
94+
if impl(ghc >= 9.6)
95+
buildable: False
9396
default-language: Haskell2010
9497
type: exitcode-stdio-1.0
9598
main-is: hlint.hs

release.nix

+13-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ let
1717
] ++ lib.optionals (reflex-platform.iosSupport) [
1818
"ghcIosAarch64"
1919
];
20+
nixpkgsGhcs =
21+
let
22+
pkgs = import ./nixpkgs { inherit system; };
23+
nixGhc945 = pkgs.haskell.packages.ghc945.override {
24+
};
25+
nixGhc961 = pkgs.haskell.packages.ghc961.override {
26+
};
27+
in
28+
{
29+
ghc945 = nixGhc945.callCabal2nix "patch" (import ./src.nix) {};
30+
ghc961 = nixGhc961.callCabal2nix "patch" (import ./src.nix) {};
31+
};
2032
compilerPkgs = lib.genAttrs compilers (ghc: let
2133
reflex-platform = reflex-platform-fun {
2234
inherit system;
@@ -39,7 +51,7 @@ let
3951
];
4052
};
4153
in reflex-platform.${ghc}.patch);
42-
in compilerPkgs // {
54+
in compilerPkgs // nixpkgsGhcs // {
4355
cache = reflex-platform.pinBuildInputs "patch-${system}"
4456
(builtins.attrValues compilerPkgs);
4557
});

src.nix

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
2+
"release.nix"
3+
".git"
4+
"dist"
5+
"cabal.haskell-ci"
6+
"cabal.project"
7+
".travis.yml"
8+
])) ./.

0 commit comments

Comments
 (0)