Skip to content

Commit c481166

Browse files
committed
Merge branch 'develop' into no-group
2 parents fc51b29 + 34eb4a5 commit c481166

31 files changed

+433
-195
lines changed

.github/workflows/haskell.yml

+12-15
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,21 @@ on: [push, pull_request]
55
jobs:
66
build:
77
strategy:
8+
fail-fast: false
89
matrix:
9-
ghc: ['8.0.2', '8.2.2', '8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.2']
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', '9.8.2', '9.10.1']
1011
os: ['ubuntu-latest', 'macos-latest']
11-
exclude:
12-
# There are some linker warnings in 802 on darwin that
13-
# cause compilation to fail
14-
# See https://github.com/NixOS/nixpkgs/issues/25139
15-
- ghc: '8.0.2'
16-
os: 'macos-latest'
1712
runs-on: ${{ matrix.os }}
1813

1914
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
2015
steps:
21-
- uses: actions/checkout@v2
22-
- uses: haskell/actions/setup@v1
16+
- uses: actions/checkout@v3
17+
- uses: haskell/actions/setup@v2
2318
with:
2419
ghc-version: ${{ matrix.ghc }}
20+
cabal-version: '3.10.1.0'
2521
- name: Cache
26-
uses: actions/cache@v1
22+
uses: actions/cache@v3
2723
env:
2824
cache-name: cache-cabal
2925
with:
@@ -36,12 +32,13 @@ jobs:
3632
${{ runner.os }}
3733
3834
- name: Install dependencies
39-
run: |
40-
cabal update
41-
cabal build --only-dependencies --enable-tests --enable-benchmarks
35+
run: cabal build --only-dependencies --enable-tests --enable-benchmarks
4236
- name: Build
4337
run: cabal build --enable-tests --enable-benchmarks all
4438
- name: Run tests
45-
run: cabal test --enable-tests all
46-
- name: Build Docs
39+
# 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.
40+
run: cabal test --enable-tests -f-hlint all
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
4744
run: cabal haddock

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
dist
22
cabal.sandbox.config
3+
cabal.project.local
34
.cabal-sandbox/
45
dist-*
56
cabal-dev
@@ -32,7 +33,7 @@ tags
3233
hsenv.log
3334
\#*#
3435
.#*
35-
/shell.nix
3636
/ghci-tmp
3737
*.dump-*
3838
*.verbose-core2core
39+
.nix

ChangeLog.md

+19
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@
99
orphan for backwards compat, temporarily, but it should eventually be removed
1010
everywhere.
1111

12+
* Add support for GHC 9.8 and 9.10
13+
14+
* Replace partial `Map.lookup` with proper custom error for internal error.
15+
(This would make debugging a bug in the implementation easier.)
16+
17+
## 0.0.8.2
18+
19+
* Add support for GHC 9.6
20+
21+
## 0.0.8.1
22+
23+
* Add support for GHC 9.2 and 9.4
24+
25+
## 0.0.8.0 - 2022-12-09
26+
27+
* Drop support for GHC 8.0 and 8.2. It may still be possible to use this library with those versions of GHC, but we do not guarantee or test it anymore.
28+
* Fix an issue where (<>) crashed for some `PatchMapWithPatchingMove`s.
29+
* Change `DecidablyEmpty` for `Sum` and `Product` to use `Num` and `Eq` rather than delegating to the argument type's `DecidablyEmpty` class. Since `Sum` and `Product` have `Monoid` actions and units that are inherently based on `Num`, it makes sense to have a `DecidablyEmpty` instances that inherently agree with that. Also, since `Int` and other numeric types don't have (and can't reasonably have) `DecidablyEmpty` instances, this is necessary to make them actually usable in this context.
30+
1231
## 0.0.7.0 - 2022-06-23
1332

1433
* Use `commutative-semigroups` for `Commutative`, making `Additive` a

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# patch
22

3-
[![Haskell](https://img.shields.io/badge/language-Haskell-orange.svg)](https://haskell.org) [![Hackage](https://img.shields.io/hackage/v/patch.svg)](https://hackage.haskell.org/package/patch) [![Hackage CI](https://matrix.hackage.haskell.org/api/v2/packages/patch/badge)](https://matrix.hackage.haskell.org/#/package/patch) [![Travis CI](https://api.travis-ci.org/reflex-frp/patch.svg?branch=develop)](https://travis-ci.org/reflex-frp/patch) [![BSD3 License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/reflex-frp/patch/LICENSE)
3+
[![Haskell](https://img.shields.io/badge/language-Haskell-orange.svg)](https://haskell.org) [![Hackage](https://img.shields.io/hackage/v/patch.svg)](https://hackage.haskell.org/package/patch) [![BSD3 License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/reflex-frp/patch/LICENSE)
44

55
Data structures for describing changes to other data structures.
66

cabal.project

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
packages: .
2+
3+
if arch(javascript)
4+
extra-packages: ghci

dep/reflex-platform/github.json

-8
This file was deleted.
File renamed without changes.

nix/deps/nix-haskell-ci/github.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"owner": "reflex-frp",
3+
"repo": "nix-haskell-ci",
4+
"branch": "main",
5+
"private": false,
6+
"rev": "17d1de24e89b9ca2c769d467b093d9c7fe58854e",
7+
"sha256": "01f0dm2rjyiz6dfx8sshdyipmp6vvzx671qnvv88sk6947l0v3cr"
8+
}

dep/reflex-platform/thunk.nix nix/deps/nix-haskell-ci/thunk.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
33
if !fetchSubmodules && !private then builtins.fetchTarball {
44
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5-
} else (import <nixpkgs> {}).fetchFromGitHub {
5+
} else (import (builtins.fetchTarball {
6+
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7+
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8+
}) {}).fetchFromGitHub {
69
inherit owner repo rev sha256 fetchSubmodules private;
710
};
811
json = builtins.fromJSON (builtins.readFile ./github.json);

nix/deps/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)

nix/deps/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+
}

nix/deps/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

nix/deps/reflex-platform/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)

nix/deps/reflex-platform/github.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"owner": "reflex-frp",
3+
"repo": "reflex-platform",
4+
"branch": "develop",
5+
"private": false,
6+
"rev": "34c75631e7f2dd1409847b9df57252b96737e73a",
7+
"sha256": "1nwyybjy65b7qnb62wcm74nqfndr8prr2xsfvaianps0yzm366d0"
8+
}

nix/deps/reflex-platform/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

nix/project/haskell.nix

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{ compiler ? "ghc910" }:
2+
3+
{
4+
project = {
5+
src = ../../.;
6+
compiler-nix-name = compiler;
7+
};
8+
}

nix/release/haskell.nix

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{ haskellNix ? null }:
2+
3+
let ci = import ../deps/nix-haskell-ci (if haskellNix != null then { inherit haskellNix; } else {});
4+
project = import ../project/haskell.nix {};
5+
in with ci.haskell-nix; buildMatrix { inherit project; targets = matrix.default; }

nix/release/reflex-platform.nix

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{ reflex-platform-fun ? import ../deps/reflex-platform
2+
}:
3+
4+
let native-reflex-platform = reflex-platform-fun { __useNewerCompiler = true; };
5+
inherit (native-reflex-platform.nixpkgs) lib;
6+
systems = [
7+
"x86_64-linux"
8+
# "x86_64-darwin"
9+
];
10+
11+
perPlatform = lib.genAttrs systems (system: let
12+
srcFilter =
13+
builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
14+
"release.nix"
15+
".git"
16+
"dist"
17+
"dist-newstyle"
18+
"cabal.haskell-ci"
19+
"cabal.project"
20+
".travis.yml"
21+
]));
22+
reflex-platform = reflex-platform-fun { inherit system; __useNewerCompiler = true; };
23+
compilers = [
24+
"ghc"
25+
"ghcjs"
26+
] ++ lib.optionals (reflex-platform.androidSupport) [
27+
"ghcAndroidAarch64"
28+
"ghcAndroidAarch32"
29+
] ++ lib.optionals (reflex-platform.iosSupport) [
30+
"ghcIosAarch64"
31+
];
32+
nixpkgsGhcs =
33+
let
34+
pkgs = import ../deps/nixpkgs { inherit system; };
35+
nixGhc945 = pkgs.haskell.packages.ghc945.override {
36+
};
37+
nixGhc961 = pkgs.haskell.packages.ghc961.override {
38+
};
39+
in
40+
{
41+
ghc945 = nixGhc945.callCabal2nix "patch" srcFilter {};
42+
ghc961 = nixGhc961.callCabal2nix "patch" srcFilter {};
43+
};
44+
compilerPkgs = lib.genAttrs compilers (ghc: let
45+
reflex-platform = reflex-platform-fun {
46+
inherit system;
47+
__useNewerCompiler = true;
48+
haskellOverlays = [
49+
# Use this package's source for reflex
50+
(self: super: {
51+
_dep = super._dep // {
52+
patch = srcFilter ../../.;
53+
};
54+
})
55+
];
56+
};
57+
in reflex-platform.${ghc}.patch);
58+
in compilerPkgs // nixpkgsGhcs // {
59+
cache = reflex-platform.pinBuildInputs "patch-${system}"
60+
(builtins.attrValues compilerPkgs);
61+
});
62+
63+
metaCache = native-reflex-platform.pinBuildInputs "patch-everywhere"
64+
(map (a: a.cache) (builtins.attrValues perPlatform));
65+
66+
in perPlatform // { inherit metaCache; }

nix/shell/haskell.nix

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{ haskellNix ? null }:
2+
3+
let ci = import ../deps/nix-haskell-ci (if haskellNix != null then { inherit haskellNix; } else {});
4+
haskell = ci.nix-haskell;
5+
project = import ../project/haskell.nix {};
6+
in haskell.project project

nix/shell/reflex-platform.nix

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
let
2+
rp = import ../deps/reflex-platform { __useNewerCompiler = true; };
3+
pkgs = rp.nixpkgs;
4+
system = builtins.currentSystem;
5+
in
6+
pkgs.mkShell {
7+
name = "shell";
8+
buildInputs = [
9+
pkgs.cabal-install
10+
pkgs.ghcid
11+
];
12+
inputsFrom = [
13+
(import ../release/reflex-platform.nix {}).${system}.ghc.env
14+
];
15+
}

0 commit comments

Comments
 (0)