Skip to content

Commit 68d66e8

Browse files
Update for GHC 9.6 (#493)
* Update for GHC 9.6 * ci: add ghc 9.6 * cabal: loosen bifunctors version bounds * ci: loosen bounds for ghc84 * ci: build exception-transformers without tests on nix * Bump version and update changelog * bench: add import to fix ghc96 build --------- Co-authored-by: Doug Beardsley <mightybyte@gmail.com>
1 parent 82c2b5e commit 68d66e8

File tree

21 files changed

+106
-19
lines changed

21 files changed

+106
-19
lines changed

.github/workflows/haskell.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.1', '9.2.5', '9.4.3']
9+
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.5', '9.4.5', '9.6.1']
1010
os: ['ubuntu-latest', 'macos-latest']
1111
runs-on: ${{ matrix.os }}
1212

1313
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v3
1616
- uses: haskell/actions/setup@v2
1717
with:
1818
ghc-version: ${{ matrix.ghc }}
19+
cabal-version: '3.10.1.0'
1920
- name: Cache
2021
uses: actions/cache@v3
2122
env:
@@ -35,5 +36,7 @@ jobs:
3536
run: cabal build --enable-tests --enable-benchmarks all
3637
- name: Run tests
3738
run: cabal test --enable-tests all
38-
- name: Build Docs
39+
- if: matrix.ghc != '8.4.4'
40+
# docs aren't built on ghc 8.4.4 because some dependency docs don't build on older GHCs
41+
name: Build Docs
3942
run: cabal haddock

ChangeLog.md

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

3+
## 0.9.0.1
4+
5+
* Add support for ghc-9.6
6+
37
## 0.9.0.0
48

59
* Breaking Change: Filter updates to `listWithKey` child widgets so that changes to the input Map don't cause spurious updates to unaffected children. This imposes an `Eq` constraint on the child values.

bench/Main.hs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Main where
1212
import Control.Concurrent.STM
1313
import Control.DeepSeq
1414
import Control.Exception (evaluate)
15+
import Control.Monad
1516
import Control.Monad.Identity
1617
import Control.Monad.IO.Class
1718
import Criterion.Main

nixpkgs/github.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"repo": "nixpkgs",
44
"branch": "nixpkgs-unstable",
55
"private": false,
6-
"rev": "e37ef84b478fa8da0ced96522adfd956fde9047a",
7-
"sha256": "03qak39mn2142gp6zglrzrkdbig6h4r3da1psmvf3q2dwcw3zsfv"
6+
"rev": "c7eb65213bd7d95eafb8c5e2e181f04da103d054",
7+
"sha256": "1glf6j13hbwi459qrc8kkkhfw27a08vdg17sr3zwhadg4bkxz5ia"
88
}

reflex.cabal

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: reflex
2-
Version: 0.9.0.0
2+
Version: 0.9.0.1
33
Synopsis: Higher-order Functional Reactive Programming
44
Description:
55
Interactive programs without callbacks or side-effects.
@@ -28,7 +28,7 @@ extra-source-files:
2828
ChangeLog.md
2929

3030
tested-with:
31-
GHC ==8.4.4 || ==8.6.5 || ==8.8.1 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.3,
31+
GHC ==8.4.4 || ==8.6.5 || ==8.8.1 || ==8.10.7 || ==9.0.1 || ==9.2.5 || ==9.4.5 || ==9.6.1,
3232
GHCJS ==8.6 || ==8.10
3333

3434
flag use-reflex-optimizer
@@ -71,38 +71,38 @@ library
7171
hs-source-dirs: src
7272
build-depends:
7373
MemoTrie == 0.6.*,
74-
base >= 4.11 && < 4.18,
75-
bifunctors >= 5.2 && < 5.6,
74+
base >= 4.11 && < 4.19,
75+
bifunctors >= 5.2 && < 5.7,
7676
comonad >= 5.0.4 && < 5.1,
7777
commutative-semigroups >= 0.1 && <0.2,
7878
constraints >= 0.10 && <0.14,
7979
constraints-extras >= 0.3 && < 0.5,
8080
containers >= 0.6 && < 0.7,
8181
data-default >= 0.5 && < 0.8,
8282
dependent-map >= 0.3 && < 0.5,
83-
exception-transformers == 0.4.*,
83+
exception-transformers >= 0.4 && < 0.5,
8484
lens >= 4.7 && < 5.3,
85-
mmorph >= 1.0 && < 1.2,
85+
mmorph >= 1.0 && < 1.3,
8686
monad-control >= 1.0.1 && < 1.1,
87-
mtl >= 2.1 && < 2.3,
87+
mtl >= 2.1 && < 2.4,
8888
patch >= 0.0.7 && < 0.1,
8989
prim-uniq >= 0.1.0.1 && < 0.3,
9090
primitive >= 0.5 && < 0.8,
9191
profunctors >= 5.3 && < 5.7,
9292
random >= 1.1 && < 1.3,
9393
ref-tf >= 0.4 && < 0.6,
9494
reflection == 2.1.*,
95-
semigroupoids >= 4.0 && < 6,
95+
semigroupoids >= 4.0 && < 7,
9696
stm >= 2.4 && < 2.6,
9797
syb >= 0.5 && < 0.8,
9898
time >= 1.4 && < 1.13,
99-
transformers >= 0.5.6.0 && < 0.6,
99+
transformers >= 0.5 && < 0.7,
100100
unbounded-delays >= 0.1.0.0 && < 0.2,
101101
witherable >= 0.4 && < 0.5
102102

103103
if flag(split-these)
104104
build-depends: these >= 1 && <1.3,
105-
semialign >=1 && <1.3,
105+
semialign >=1 && <1.4,
106106
monoidal-containers >= 0.6.2.0 && < 0.7
107107
else
108108
build-depends: these >= 0.4 && <0.9,
@@ -188,7 +188,7 @@ library
188188
dependent-sum >= 0.6 && < 0.8,
189189
haskell-src-exts >= 1.16 && < 1.24,
190190
haskell-src-meta >= 0.6 && < 0.9,
191-
template-haskell >= 2.9 && < 2.20
191+
template-haskell >= 2.9 && < 2.21
192192
exposed-modules:
193193
Reflex.Dynamic.TH
194194
other-extensions: TemplateHaskell
@@ -260,6 +260,8 @@ test-suite hlint
260260
, directory
261261
, filepath
262262
, filemanip
263+
if impl(ghc >= 9.6)
264+
buildable: False
263265
if impl(ghc < 9.2)
264266
build-depends: hlint (< 2.1 || >= 2.2.2) && < 3.5
265267
else

release.nix

+58-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
let
66
native-reflex-platform = reflex-platform-fun { __useNewerCompiler = true; };
77
inherit (native-reflex-platform.nixpkgs) lib;
8-
98
perPlatform = lib.genAttrs supportedSystems (system: let
109
reflex-platform = reflex-platform-fun { inherit system; __useNewerCompiler = true; };
1110
compilers = [
@@ -21,6 +20,63 @@ let
2120
"-dontUseTemplateHaskell"
2221
""
2322
];
23+
pkgs = import ./nixpkgs { inherit system; };
24+
sharedOverrides = self: super: {
25+
exception-transformers = pkgs.haskell.lib.dontCheck super.exception-transformers;
26+
};
27+
nixpkgsGhcs =
28+
let
29+
nixGhc902 = pkgs.haskell.packages.ghc902.override { overrides = sharedOverrides; };
30+
nixGhc945 = pkgs.haskell.packages.ghc945.override { overrides = sharedOverrides; };
31+
nixGhc961 = pkgs.haskell.packages.ghc961.override {
32+
overrides = self: super: sharedOverrides self super // {
33+
these-lens = self.callHackageDirect {
34+
pkg = "these-lens";
35+
ver = "1.0.1.3";
36+
sha256 = "0n1vkr57jz5yvy4jm15v5cs42rp342ni0gisib7aqyhibpicqs5c";
37+
} {};
38+
these = self.callHackageDirect {
39+
pkg = "these";
40+
ver = "1.2";
41+
sha256 = "1iaaq1fsvg8c3l0czcicshkmbbr00hnwkdamjbkljsa1qvlilaf0";
42+
} {};
43+
lens = self.callHackageDirect {
44+
pkg = "lens";
45+
ver = "5.2.2";
46+
sha256 = "0c4a421sxfjm1cj3nvgwkr4glll23mqnsvs2iv5qh85931h2f3cy";
47+
} {};
48+
49+
assoc = self.callHackageDirect {
50+
pkg = "assoc";
51+
ver = "1.1";
52+
sha256 = "1krvcafrbj98z5hv55gq4zb1in5yd71nmz9zdiqgnywjzbrvpf75";
53+
} {};
54+
55+
strict = self.callHackageDirect {
56+
pkg = "strict";
57+
ver = "0.5";
58+
sha256 = "02iyvrr7nd7fnivz78lzdchy8zw1cghqj1qx2yzbbb9869h1mny7";
59+
} {};
60+
61+
hlint = self.callHackageDirect {
62+
pkg = "hlint";
63+
ver = "3.5";
64+
sha256 = "1np43k54918v54saqqgnd82ccd6225njwxpg2031asi70jam80x9";
65+
} {};
66+
67+
patch = self.callHackageDirect {
68+
pkg = "patch";
69+
ver = "0.0.8.2";
70+
sha256 = "160zqqhjg48fr3a33gffd82qm3728c8hwf8sn37pbpv82fw71rzg";
71+
} {};
72+
};
73+
};
74+
in
75+
{
76+
ghc902 = nixGhc902.callCabal2nix "reflex" (import ./src.nix) {};
77+
ghc945 = nixGhc945.callCabal2nix "reflex" (import ./src.nix) {};
78+
ghc961 = nixGhc961.callCabal2nix "reflex" (import ./src.nix) {};
79+
};
2480
compilerPkgs = lib.genAttrs compilers (ghc: let
2581
variationPkgs = lib.genAttrs variations (variation: let
2682
reflex-platform = reflex-platform-fun {
@@ -40,7 +96,7 @@ let
4096
cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}"
4197
(builtins.attrValues variationPkgs);
4298
});
43-
in compilerPkgs // {
99+
in compilerPkgs // nixpkgsGhcs // {
44100
cache = reflex-platform.pinBuildInputs "reflex-${system}"
45101
(map (a: a.cache) (builtins.attrValues compilerPkgs));
46102
});

src/Reflex/BehaviorWriter/Base.hs

+2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ module Reflex.BehaviorWriter.Base
2121
, withBehaviorWriterT
2222
) where
2323

24+
import Control.Monad
2425
import Control.Monad.Exception
26+
import Control.Monad.Fix
2527
import Control.Monad.Identity
2628
import Control.Monad.IO.Class
2729
import Control.Monad.Morph

src/Reflex/Class.hs

+2
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ import Data.Zip (Zip (..), Unzip (..))
185185
#endif
186186

187187
import Control.Applicative
188+
import Control.Monad
189+
import Control.Monad.Fix
188190
import Control.Monad.Identity
189191
import Control.Monad.Reader
190192
import Control.Monad.State.Strict

src/Reflex/Collection.hs

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ import Data.Zip (Zip (..))
3434
#endif
3535
#endif
3636

37+
import Control.Monad
38+
import Control.Monad.Fix
3739
import Control.Monad.Identity
3840
import Data.Align
3941
import Data.Functor.Misc

src/Reflex/Dynamic.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ import Data.Monoid ((<>))
9999
import Data.These
100100
import Data.Type.Equality ((:~:) (..))
101101

102-
import Debug.Trace
102+
import Debug.Trace hiding (traceEventWith)
103103

104104
-- | Map a sampling function over a 'Dynamic'.
105105
mapDynM :: forall t m a b. (Reflex t, MonadHold t m) => (forall m'. MonadSample t m' => a -> m' b) -> Dynamic t a -> m (Dynamic t b)

src/Reflex/DynamicWriter/Base.hs

+2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ module Reflex.DynamicWriter.Base
1919
, withDynamicWriterT
2020
) where
2121

22+
import Control.Monad
2223
import Control.Monad.Exception
24+
import Control.Monad.Fix
2325
import Control.Monad.Identity
2426
import Control.Monad.IO.Class
2527
import Control.Monad.Morph

src/Reflex/EventWriter/Base.hs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import Reflex.Requester.Class
3434
import Reflex.TriggerEvent.Class
3535

3636
import Control.Monad.Exception
37+
import Control.Monad.Fix
3738
import Control.Monad.Identity
3839
import Control.Monad.Morph
3940
import Control.Monad.Primitive

src/Reflex/PerformEvent/Base.hs

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Reflex.Requester.Class
3333

3434
import Control.Lens
3535
import Control.Monad.Exception
36+
import Control.Monad.Fix
3637
import Control.Monad.Identity
3738
import Control.Monad.Primitive
3839
import Control.Monad.Reader

src/Reflex/PerformEvent/Class.hs

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module Reflex.PerformEvent.Class
1717
, performEventAsync
1818
) where
1919

20+
import Control.Monad
21+
import Control.Monad.Fix
2022
import Control.Monad.Reader
2123
import Control.Monad.Trans.Maybe (MaybeT (..))
2224

src/Reflex/PostBuild/Base.hs

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import Reflex.TriggerEvent.Class
3030

3131
import Control.Applicative (liftA2)
3232
import Control.Monad.Exception
33+
import Control.Monad.Fix
3334
import Control.Monad.Identity
3435
import Control.Monad.Primitive
3536
import Control.Monad.Reader

src/Reflex/Requester/Base/Internal.hs

+2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import Reflex.Requester.Class
3232
import Reflex.TriggerEvent.Class
3333

3434
import Control.Applicative (liftA2)
35+
import Control.Monad
3536
import Control.Monad.Exception
37+
import Control.Monad.Fix
3638
import Control.Monad.Identity
3739
import Control.Monad.Morph
3840
import Control.Monad.Primitive

src/Reflex/Requester/Class.hs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module Reflex.Requester.Class
1818
, requestingIdentity
1919
) where
2020

21+
import Control.Monad.Fix
2122
import Control.Monad.Identity
2223
import Control.Monad.Reader
2324
import qualified Control.Monad.State.Lazy as Lazy

src/Reflex/Spider/Internal.hs

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import Control.Concurrent
3636
import Control.Exception
3737
import Control.Monad hiding (forM, forM_, mapM, mapM_)
3838
import Control.Monad.Exception
39+
import Control.Monad.Fix
3940
import Control.Monad.Identity hiding (forM, forM_, mapM, mapM_)
4041
import Control.Monad.Primitive
4142
import Control.Monad.Reader.Class

src/Reflex/TriggerEvent/Base.hs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module Reflex.TriggerEvent.Base
1616
import Control.Applicative (liftA2)
1717
import Control.Concurrent
1818
import Control.Monad.Exception
19+
import Control.Monad.Fix
1920
import Control.Monad.Primitive
2021
import Control.Monad.Reader
2122
import Control.Monad.Ref

test/Reflex/Plan/Reflex.hs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import Reflex.TestPlan
3434

3535
import Control.Applicative
3636
import Control.Monad
37+
import Control.Monad.Fix
3738
import Control.Monad.Identity
3839
import Control.Monad.State.Strict
3940

test/Reflex/Test/CrossImpl.hs

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import qualified Reflex.Spider.Internal as S
2424
import qualified Reflex.Profiled as Prof
2525

2626
import Control.Arrow (second, (&&&))
27+
import Control.Monad
28+
import Control.Monad.Fix
2729
import Control.Monad.Identity hiding (forM, forM_, mapM, mapM_, sequence, sequence_)
2830
import Control.Monad.State.Strict hiding (forM, forM_, mapM, mapM_, sequence, sequence_)
2931
import Data.Dependent.Sum (DSum (..))

0 commit comments

Comments
 (0)