Skip to content

Commit

Permalink
Merge pull request #53 from reflex-frp/aa/ghc96
Browse files Browse the repository at this point in the history
Add support for ghc 9.6
  • Loading branch information
ali-abrar authored May 24, 2023
2 parents ba4a1d4 + 6fd58c2 commit 35af1b3
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 12 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.3']
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']
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}

name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.10.1.0'
- name: Cache
uses: actions/cache@v3
env:
Expand All @@ -37,5 +38,7 @@ jobs:
- name: Run tests
# 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.
run: cabal test --enable-tests -f-hlint all
- name: Build Docs
- if: matrix.ghc != '8.4.4'
# docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs
name: Build Docs
run: cabal haddock
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for patch

## 0.0.8.2

* Add support for GHC 9.6

## 0.0.8.1

* Add support for GHC 9.2 and 9.4
Expand Down
2 changes: 2 additions & 0 deletions nixpkgs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
8 changes: 8 additions & 0 deletions nixpkgs/github.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"owner": "NixOS",
"repo": "nixpkgs",
"branch": "nixpkgs-unstable",
"private": false,
"rev": "c7eb65213bd7d95eafb8c5e2e181f04da103d054",
"sha256": "1glf6j13hbwi459qrc8kkkhfw27a08vdg17sr3zwhadg4bkxz5ia"
}
12 changes: 12 additions & 0 deletions nixpkgs/thunk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
}) {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
17 changes: 10 additions & 7 deletions patch.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: patch
Version: 0.0.8.1
Version: 0.0.8.2
Synopsis: Data structures for describing changes to other data structures.
Description:
Data structures for describing changes to other data structures.
Expand All @@ -22,7 +22,7 @@ extra-source-files:
ChangeLog.md

tested-with:
GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.3
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
GHCJS ==8.6 || ==8.10

flag split-these
Expand All @@ -37,19 +37,19 @@ flag hlint
library
hs-source-dirs: src
default-language: Haskell2010
build-depends: base >= 4.9 && < 4.18
build-depends: base >= 4.9 && < 4.19
, constraints-extras >= 0.3 && < 0.5
, commutative-semigroups >= 0.0 && < 0.2
, containers >= 0.6 && < 0.7
, dependent-map >= 0.3 && < 0.5
, dependent-sum >= 0.6 && < 0.8
, lens >= 4.7 && < 5.3
, indexed-traversable >= 0.1 && < 0.2
, semigroupoids >= 4.0 && < 6
, semigroupoids >= 4.0 && < 7
, transformers >= 0.5.6.0 && < 0.7
, witherable >= 0.3 && < 0.5

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

exposed-modules: Data.Functor.Misc
Expand All @@ -69,8 +69,8 @@ library
default-extensions: PolyKinds

if flag(split-these)
build-depends: these >= 1 && <1.2
, semialign >=1 && <1.3
build-depends: these >= 1 && <1.3
, semialign >=1 && <1.4
, monoidal-containers >= 0.6 && < 0.7
else
build-depends: these >= 0.4 && <0.9
Expand All @@ -90,6 +90,9 @@ test-suite tests
buildable: False

test-suite hlint
-- hlint doesn't support ghc-9.6 yet (as of version 3.5)
if impl(ghc >= 9.6)
buildable: False
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: hlint.hs
Expand Down
14 changes: 13 additions & 1 deletion release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ let
] ++ lib.optionals (reflex-platform.iosSupport) [
"ghcIosAarch64"
];
nixpkgsGhcs =
let
pkgs = import ./nixpkgs { inherit system; };
nixGhc945 = pkgs.haskell.packages.ghc945.override {
};
nixGhc961 = pkgs.haskell.packages.ghc961.override {
};
in
{
ghc945 = nixGhc945.callCabal2nix "patch" (import ./src.nix) {};
ghc961 = nixGhc961.callCabal2nix "patch" (import ./src.nix) {};
};
compilerPkgs = lib.genAttrs compilers (ghc: let
reflex-platform = reflex-platform-fun {
inherit system;
Expand All @@ -39,7 +51,7 @@ let
];
};
in reflex-platform.${ghc}.patch);
in compilerPkgs // {
in compilerPkgs // nixpkgsGhcs // {
cache = reflex-platform.pinBuildInputs "patch-${system}"
(builtins.attrValues compilerPkgs);
});
Expand Down
8 changes: 8 additions & 0 deletions src.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
"release.nix"
".git"
"dist"
"cabal.haskell-ci"
"cabal.project"
".travis.yml"
])) ./.

0 comments on commit 35af1b3

Please sign in to comment.