on develop help sign in
Merge pull request #454 from reflex-frp/try-backport-ghc-10

Backport GHC 10 support to reflex 0.7

commitca187bb5ab4c0533c02b418ff43aae0541f849db authorJohn Ericson <John.Ericson@Obsidian.Systems> dateTue 15 Jun 2021, 17:13 (5 years ago) parent122d736804a080
20 files changed+91−211
.github/workflows/haskell.yml+41 .travis.yml−177 ChangeLog.md+6 README.md+1−1 cabal.project.freeze−2 reflex.cabal+17−13 src/Reflex/Adjustable/Class.hs+2−1 src/Reflex/Class.hs+2−1 src/Reflex/EventWriter/Base.hs+2−1 src/Reflex/PerformEvent/Class.hs−1 src/Reflex/PostBuild/Base.hs−1 src/Reflex/PostBuild/Class.hs−1 src/Reflex/Profiled.hs+3−2 src/Reflex/Pure.hs+2−1 src/Reflex/Query/Base.hs+5−3 src/Reflex/Requester/Base.hs+2−1 src/Reflex/Spider/Internal.hs+4−3 test/GC.hs+1 test/Reflex/Test/CrossImpl.hs+1−1 test/hlint.hs+2−1
.github/workflows/haskell.ymlnew file+41
@@ -0,0 +1,41 @@
1+name: github-action
2+
3+on: [push, pull_request]
4+
5+jobs:
6+ build:
7+ strategy:
8+ matrix:
9+ ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.2']
10+ os: ['ubuntu-latest', 'macos-latest']
11+ runs-on: ${{ matrix.os }}
12+
13+ name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
14+ steps:
15+ - uses: actions/checkout@v2
16+ - uses: actions/setup-haskell@v1
17+ with:
18+ ghc-version: ${{ matrix.ghc }}
19+ - name: Cache
20+ uses: actions/cache@v1
21+ env:
22+ cache-name: cache-cabal
23+ with:
24+ path: ~/.cabal
25+ key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
26+ restore-keys: |
27+ ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
28+ ${{ runner.os }}-${{ matrix.ghc }}-build-
29+ ${{ runner.os }}-${{ matrix.ghc }}-
30+ ${{ runner.os }}
31+
32+ - name: Install dependencies
33+ run: |
34+ cabal update
35+ cabal build --only-dependencies --enable-tests --enable-benchmarks
36+ - name: Build
37+ run: cabal build --enable-tests --enable-benchmarks all
38+ - name: Run tests
39+ run: cabal test all
40+ - name: Build Docs
41+ run: cabal haddock
.travis.ymldeleted−177
@@ -1,177 +0,0 @@
1−# This Travis job script has been generated by a script via
2−#
3−# haskell-ci '--config=cabal.haskell-ci' 'cabal.project'
4−#
5−# For more information, see https://github.com/haskell-CI/haskell-ci
6−#
7−# version: 0.3.20190814
8−#
9−language: c
10−dist: xenial
11−sudo: required
12−git:
13− # whether to recursively clone submodules
14− submodules: false
15−cache:
16− directories:
17− - $HOME/.cabal/packages
18− - $HOME/.cabal/store
19−before_cache:
20− - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
21− # remove files that are regenerated by 'cabal update'
22− - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
23− - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
24− - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
25− - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
26− - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
27− - rm -rfv $CABALHOME/packages/head.hackage
28−matrix:
29− include:
30− - compiler: ghcjs-8.4
31− addons: {"apt":{"sources":["hvr-ghc"],"packages":["cabal-install-3.0"]}}
32− - compiler: ghc-8.8.1
33− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
34− - compiler: ghc-8.6.5
35− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
36− - compiler: ghc-8.4.4
37− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
38− - compiler: ghc-8.2.2
39− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
40− - compiler: ghc-8.0.2
41− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
42−before_install:
43− - |
44− if [ "$TRAVIS_OS_NAME" = "linux" ]; then
45− sudo add-apt-repository -y ppa:hvr/ghcjs;
46− curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
47− sudo apt-add-repository 'https://deb.nodesource.com/node_8.x xenial main'
48− sudo apt-get update;
49− sudo apt-get install $CC cabal-install-3.0 nodejs;
50− fi
51− - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
52− - WITHCOMPILER="-w $HC"
53− - |
54− if echo $CC | grep -q ghcjs; then
55− GHCJS=true
56− HC=${HC}js
57− WITHCOMPILER="--ghcjs ${WITHCOMPILER}js"
58− else
59− GHCJS=false;
60− fi
61− - if $GHCJS ; then sudo apt-get install -y ghc-8.4.4 ; fi
62− - if $GHCJS ; then PATH="/opt/ghc/8.4.4/bin:$PATH" ; fi
63− - HCPKG="$HC-pkg"
64− - unset CC
65− - CABAL=/opt/ghc/bin/cabal
66− - CABALHOME=$HOME/.cabal
67− - export PATH="$CABALHOME/bin:$PATH"
68− - TOP=$(pwd)
69− - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
70− - echo $HCNUMVER
71− - CABAL="$CABAL -vnormal+nowrap+markoutput"
72− - set -o pipefail
73− - |
74− echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
75− echo 'BEGIN { state = "output"; }' >> .colorful.awk
76− echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
77− echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
78− echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
79− echo ' if (state == "cabal") {' >> .colorful.awk
80− echo ' print blue($0)' >> .colorful.awk
81− echo ' } else {' >> .colorful.awk
82− echo ' print $0' >> .colorful.awk
83− echo ' }' >> .colorful.awk
84− echo '}' >> .colorful.awk
85− - cat .colorful.awk
86− - |
87− color_cabal_output () {
88− awk -f $TOP/.colorful.awk
89− }
90− - echo text | color_cabal_output
91−install:
92− - ${CABAL} --version
93− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
94− - node --version
95− - echo $GHCJS
96− - TEST=--enable-tests
97− - BENCH=--enable-benchmarks
98− - BENCH=--disable-benchmarks
99− - HEADHACKAGE=false
100− - rm -f $CABALHOME/config
101− - |
102− echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
103− echo "remote-build-reporting: anonymous" >> $CABALHOME/config
104− echo "write-ghc-environment-files: always" >> $CABALHOME/config
105− echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
106− echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
107− echo "world-file: $CABALHOME/world" >> $CABALHOME/config
108− echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
109− echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
110− echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
111− echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
112− echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
113− echo "install-dirs user" >> $CABALHOME/config
114− echo " prefix: $CABALHOME" >> $CABALHOME/config
115− echo "repository hackage.haskell.org" >> $CABALHOME/config
116− echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
117− - cat $CABALHOME/config
118− - rm -fv cabal.project cabal.project.local cabal.project.freeze
119− - travis_retry ${CABAL} v2-update -v
120− - if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.4.4 happy) ; fi
121− # Generate cabal.project
122− - rm -rf cabal.project cabal.project.local cabal.project.freeze
123− - touch cabal.project
124− - |
125− echo "packages: ." >> cabal.project
126− - |
127− - cat cabal.project || true
128− - cat cabal.project.local || true
129− - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
130− - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
131− - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
132− - rm cabal.project.freeze
133−script:
134− - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
135− # Packaging...
136− - ${CABAL} v2-sdist all | color_cabal_output
137− # Unpacking...
138− - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
139− - cd ${DISTDIR} || false
140− - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
141− - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
142− - PKGDIR_reflex="$(find . -maxdepth 1 -type d -regex '.*/reflex-[0-9.]*')"
143− # Generate cabal.project
144− - rm -rf cabal.project cabal.project.local cabal.project.freeze
145− - touch cabal.project
146− - |
147− echo "packages: ${PKGDIR_reflex}" >> cabal.project
148− - |
149− - cat cabal.project || true
150− - cat cabal.project.local || true
151− # Building...
152− # this builds all libraries and executables (without tests/benchmarks)
153− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
154− # Building with tests and benchmarks...
155− # build & run tests, build benchmarks
156− - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
157− # Testing...
158− - if ! $GHCJS ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
159− # cabal check...
160− - (cd ${PKGDIR_reflex} && ${CABAL} -vnormal check)
161− # haddock...
162− - if ! $GHCJS ; then ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
163− # Constraint sets
164− - rm -rf cabal.project.local
165− # Constraint set no-th
166− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
167− # Constraint set old-these
168− - if $GHCJS || ! $GHCJS && [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output ; fi
169− # Constraint set old-witherable
170− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
171− # Constraint set debug-propagation
172− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex +debug-propagation' all | color_cabal_output
173− # Constraint set debug-cycles
174− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex +debug-cycles' all | color_cabal_output
175−
176−# REGENDATA ["--config=cabal.haskell-ci","cabal.project"]
177−# EOF
ChangeLog.md+6
@@ -1,5 +1,11 @@
11# Revision history for reflex
22
3+## 0.7.1.1
4+
5+* Add support for GHC 8.10
6+* Extend some dependency version bounds
7+* Fix HLint 3 test
8+
39## 0.7.1.0
410
511* ([#413](https://github.com/reflex-frp/reflex/pull/413), [#417](https://github.com/reflex-frp/reflex/pull/417)) Add `Reflex.Host.Headless` module which provides `runHeadlessApp` as an easy way to run a Reflex network in a "headless" environment.
README.md+1−1
@@ -1,6 +1,6 @@
11## [Reflex](https://reflex-frp.org/)
22
3−[![Hackage](https://img.shields.io/hackage/v/reflex.svg)](http://hackage.haskell.org/package/reflex)
3+[![Haskell](https://img.shields.io/badge/language-Haskell-orange.svg)](https://haskell.org) [![Hackage](https://img.shields.io/hackage/v/reflex.svg)](https://hackage.haskell.org/package/reflex) [![Hackage CI](https://matrix.hackage.haskell.org/api/v2/packages/reflex/badge)](https://matrix.hackage.haskell.org/#/package/reflex) [![BSD3 License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/reflex-frp/reflex/blob/master/LICENSE)
44
55### Practical Functional Reactive Programming
66
cabal.project.freezedeleted−2
@@ -1,2 +0,0 @@
1−constraints: any.text < 1.2.4.0
2− , hlint < 2.2.6 || > 2.2.6
reflex.cabal+17−13
@@ -1,5 +1,5 @@
11Name: reflex
2−Version: 0.7.1.0
2+Version: 0.7.1.1
33Synopsis: Higher-order Functional Reactive Programming
44Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
55License: BSD3
@@ -18,8 +18,8 @@ extra-source-files:
1818 ChangeLog.md
1919
2020tested-with:
21− GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1,
22− GHCJS ==8.4
21+ GHC ==8.4.4 || ==8.6.5 || ==8.8.1 || ==8.10.2,
22+ GHCJS ==8.6
2323
2424flag use-reflex-optimizer
2525 description: Use the GHC plugin Reflex.Optimizer on some of the modules in the package. This is still experimental.
@@ -61,21 +61,22 @@ library
6161 hs-source-dirs: src
6262 build-depends:
6363 MemoTrie == 0.6.*,
64− base >= 4.9 && < 4.14,
64+ base >= 4.11 && < 4.15,
6565 bifunctors >= 5.2 && < 5.6,
6666 comonad >= 5.0.4 && < 5.1,
6767 constraints-extras >= 0.3 && < 0.4,
6868 containers >= 0.6 && < 0.7,
6969 data-default >= 0.5 && < 0.8,
70− dependent-map >= 0.3 && < 0.4,
70+ dependent-map >= 0.3 && < 0.5,
7171 exception-transformers == 0.4.*,
7272 lens >= 4.7 && < 5,
73+ mmorph >= 1.0 && < 1.2,
7374 monad-control >= 1.0.1 && < 1.1,
7475 mtl >= 2.1 && < 2.3,
7576 patch >= 0.0.1 && < 0.1,
76− prim-uniq >= 0.1.0.1 && < 0.2,
77+ prim-uniq >= 0.1.0.1 && < 0.3,
7778 primitive >= 0.5 && < 0.8,
78− profunctors >= 5.3 && < 5.6,
79+ profunctors >= 5.3 && < 5.7,
7980 random == 1.1.*,
8081 ref-tf == 0.4.*,
8182 reflection == 2.1.*,
@@ -85,10 +86,10 @@ library
8586 time >= 1.4 && < 1.10,
8687 transformers >= 0.5.6.0 && < 0.6,
8788 unbounded-delays >= 0.1.0.0 && < 0.2,
88− witherable >= 0.3 && < 0.3.2
89+ witherable >= 0.3 && < 0.4
8990
9091 if flag(split-these)
91− build-depends: these >= 1 && <1.1,
92+ build-depends: these >= 1 && <1.2,
9293 semialign >=1 && <1.2,
9394 monoidal-containers >= 0.6 && < 0.7
9495 else
@@ -170,10 +171,10 @@ library
170171 if flag(use-template-haskell)
171172 cpp-options: -DUSE_TEMPLATE_HASKELL
172173 build-depends:
173− dependent-sum >= 0.6 && < 0.7,
174− haskell-src-exts >= 1.16 && < 1.23,
174+ dependent-sum >= 0.6 && < 0.8,
175+ haskell-src-exts >= 1.16 && < 1.24,
175176 haskell-src-meta >= 0.6 && < 0.9,
176− template-haskell >= 2.9 && < 2.16
177+ template-haskell >= 2.9 && < 2.17
177178 exposed-modules:
178179 Reflex.Dynamic.TH
179180 other-extensions: TemplateHaskell
@@ -244,7 +245,10 @@ test-suite hlint
244245 , directory
245246 , filepath
246247 , filemanip
247− , hlint (< 2.1 || >= 2.2.2) && < 3
248+ if impl(ghc >= 8.8)
249+ build-depends: hlint >= 3
250+ else
251+ build-depends: hlint (< 2.1 || >= 2.2.2) && < 3
248252 if impl(ghcjs)
249253 buildable: False
250254
src/Reflex/Adjustable/Class.hs+2−1
@@ -30,7 +30,8 @@ module Reflex.Adjustable.Class
3030
3131import Control.Monad.Identity
3232import Control.Monad.Reader
33−import Data.Dependent.Map (DMap, GCompare (..))
33+import Data.Dependent.Map (DMap)
34+import Data.GADT.Compare (GCompare(..))
3435import qualified Data.Dependent.Map as DMap
3536import Data.Functor.Constant
3637import Data.Functor.Misc
src/Reflex/Class.hs+2−1
@@ -196,7 +196,8 @@ import Data.Align
196196import Data.Bifunctor
197197import Data.Coerce
198198import Data.Default
199−import Data.Dependent.Map (DMap, DSum (..))
199+import Data.Dependent.Map (DMap)
200+import Data.Dependent.Sum (DSum (..))
200201import qualified Data.Dependent.Map as DMap
201202import Data.Functor.Compose
202203import Data.Functor.Product
src/Reflex/EventWriter/Base.hs+2−1
@@ -39,8 +39,9 @@ import Control.Monad.Primitive
3939import Control.Monad.Reader
4040import Control.Monad.Ref
4141import Control.Monad.State.Strict
42−import Data.Dependent.Map (DMap, DSum (..))
42+import Data.Dependent.Map (DMap)
4343import qualified Data.Dependent.Map as DMap
44+import Data.Dependent.Sum (DSum (..))
4445import Data.Functor.Compose
4546import Data.Functor.Misc
4647import Data.GADT.Compare (GCompare (..), GEq (..), GOrdering (..))
src/Reflex/PerformEvent/Class.hs−1
@@ -8,7 +8,6 @@
88{-# LANGUAGE RankNTypes #-}
99{-# LANGUAGE ScopedTypeVariables #-}
1010{-# LANGUAGE TypeFamilies #-}
11−{-# LANGUAGE TypeOperators #-}
1211{-# LANGUAGE UndecidableInstances #-}
1312#ifdef USE_REFLEX_OPTIMIZER
1413{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
src/Reflex/PostBuild/Base.hs−1
@@ -9,7 +9,6 @@
99{-# LANGUAGE RecursiveDo #-}
1010{-# LANGUAGE ScopedTypeVariables #-}
1111{-# LANGUAGE TypeFamilies #-}
12−{-# LANGUAGE TypeOperators #-}
1312{-# LANGUAGE UndecidableInstances #-}
1413#ifdef USE_REFLEX_OPTIMIZER
1514{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
src/Reflex/PostBuild/Class.hs−1
@@ -6,7 +6,6 @@
66{-# LANGUAGE FunctionalDependencies #-}
77{-# LANGUAGE ScopedTypeVariables #-}
88{-# LANGUAGE TypeFamilies #-}
9−{-# LANGUAGE TypeOperators #-}
109{-# LANGUAGE UndecidableInstances #-}
1110#ifdef USE_REFLEX_OPTIMIZER
1211{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
src/Reflex/Profiled.hs+3−2
@@ -28,7 +28,8 @@ import Control.Monad.Ref
2828import Control.Monad.State.Strict (StateT, execStateT, modify)
2929import Data.Bifunctor
3030import Data.Coerce
31−import Data.Dependent.Map (DMap, GCompare)
31+import Data.Dependent.Map (DMap)
32+import Data.GADT.Compare (GCompare)
3233import Data.FastMutableIntMap
3334import Data.IORef
3435import Data.List
@@ -146,7 +147,7 @@ instance Reflex t => Reflex (ProfiledTimeline t) where
146147 pushCheap f (Event_Profiled e) = coerce $ pushCheap (coerce f) $ profileEvent e
147148 pull = Behavior_Profiled . pull . coerce
148149 fanG (Event_Profiled e) = EventSelectorG $ coerce $ selectG (fanG $ profileEvent e)
149− mergeG :: forall (k :: z -> *) q v. GCompare k
150+ mergeG :: forall z (k :: z -> *) q v. GCompare k
150151 => (forall a. q a -> Event (ProfiledTimeline t) (v a))
151152 -> DMap k q -> Event (ProfiledTimeline t) (DMap k v)
152153 mergeG nt = Event_Profiled #. mergeG (coerce nt)
src/Reflex/Pure.hs+2−1
@@ -32,7 +32,8 @@ module Reflex.Pure
3232 ) where
3333
3434import Control.Monad
35−import Data.Dependent.Map (DMap, GCompare)
35+import Data.Dependent.Map (DMap)
36+import Data.GADT.Compare (GCompare)
3637import qualified Data.Dependent.Map as DMap
3738import Data.IntMap (IntMap)
3839import qualified Data.IntMap as IntMap
src/Reflex/Query/Base.hs+5−3
@@ -27,11 +27,13 @@ import Control.Monad.Reader
2727import Control.Monad.Ref
2828import Control.Monad.State.Strict
2929import Data.Align
30−import Data.Dependent.Map (DMap, DSum (..))
30+import Data.Dependent.Map (DMap)
3131import qualified Data.Dependent.Map as DMap
32+import Data.Dependent.Sum (DSum(..))
3233import Data.Foldable
3334import Data.Functor.Compose
3435import Data.Functor.Misc
36+import Data.GADT.Compare (GCompare)
3537import Data.IntMap (IntMap)
3638import qualified Data.IntMap as IntMap
3739import Data.Map (Map)
@@ -135,7 +137,7 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q, MonadHold t
135137 tellQueryIncremental $ unsafeBuildIncremental (fold <$> mapM sampleBs liftedBs0) qpatch
136138 return (liftedResult0, liftedResult')
137139
138− traverseDMapWithKeyWithAdjust :: forall (k :: * -> *) v v'. (DMap.GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> QueryT t q m (DMap k v', Event t (PatchDMap k v'))
140+ traverseDMapWithKeyWithAdjust :: forall (k :: * -> *) v v'. (GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> QueryT t q m (DMap k v', Event t (PatchDMap k v'))
139141 traverseDMapWithKeyWithAdjust f dm0 dm' = do
140142 let f' :: forall a. k a -> v a -> EventWriterT t q (ReaderT (Dynamic t (QueryResult q)) m) (Compose (QueryTLoweredResult t q) v' a)
141143 f' k v = fmap (Compose . QueryTLoweredResult) $ flip runStateT [] $ unQueryT $ f k v
@@ -180,7 +182,7 @@ instance (Reflex t, MonadFix m, Group q, Additive q, Query q, Eq q, MonadHold t
180182 tellQueryIncremental $ unsafeBuildIncremental (fold <$> mapM sampleBs liftedBs0) qpatch
181183 return (liftedResult0, liftedResult')
182184
183− traverseDMapWithKeyWithAdjustWithMove :: forall (k :: * -> *) v v'. (DMap.GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMapWithMove k v) -> QueryT t q m (DMap k v', Event t (PatchDMapWithMove k v'))
185+ traverseDMapWithKeyWithAdjustWithMove :: forall (k :: * -> *) v v'. (GCompare k) => (forall a. k a -> v a -> QueryT t q m (v' a)) -> DMap k v -> Event t (PatchDMapWithMove k v) -> QueryT t q m (DMap k v', Event t (PatchDMapWithMove k v'))
184186 traverseDMapWithKeyWithAdjustWithMove f dm0 dm' = do
185187 let f' :: forall a. k a -> v a -> EventWriterT t q (ReaderT (Dynamic t (QueryResult q)) m) (Compose (QueryTLoweredResult t q) v' a)
186188 f' k v = fmap (Compose . QueryTLoweredResult) $ flip runStateT [] $ unQueryT $ f k v
src/Reflex/Requester/Base.hs+2−1
@@ -55,8 +55,9 @@ import Control.Monad.Ref
5555import Control.Monad.State.Strict
5656import Data.Bits
5757import Data.Coerce
58−import Data.Dependent.Map (DMap, DSum (..))
58+import Data.Dependent.Map (DMap)
5959import qualified Data.Dependent.Map as DMap
60+import Data.Dependent.Sum (DSum (..))
6061import Data.Functor.Compose
6162import Data.Functor.Misc
6263import Data.IntMap.Strict (IntMap)
src/Reflex/Spider/Internal.hs+4−3
@@ -9,7 +9,6 @@
99{-# LANGUAGE GADTs #-}
1010{-# LANGUAGE GeneralizedNewtypeDeriving #-}
1111{-# LANGUAGE LambdaCase #-}
12−{-# LANGUAGE MultiWayIf #-}
1312{-# LANGUAGE RankNTypes #-}
1413{-# LANGUAGE RoleAnnotations #-}
1514{-# LANGUAGE ScopedTypeVariables #-}
@@ -20,6 +19,7 @@
2019{-# LANGUAGE DeriveFunctor #-}
2120{-# LANGUAGE StandaloneDeriving #-}
2221{-# LANGUAGE InstanceSigs #-}
22+{-# LANGUAGE MultiWayIf #-}
2323
2424#ifdef USE_REFLEX_OPTIMIZER
2525{-# OPTIONS_GHC -fplugin=Reflex.Optimizer #-}
@@ -46,8 +46,9 @@ import Control.Monad.Fail (MonadFail)
4646import qualified Control.Monad.Fail as MonadFail
4747import Data.Align
4848import Data.Coerce
49−import Data.Dependent.Map (DMap, DSum (..))
49+import Data.Dependent.Map (DMap)
5050import qualified Data.Dependent.Map as DMap
51+import Data.Dependent.Sum (DSum (..))
5152import Data.FastMutableIntMap (FastMutableIntMap, PatchIntMap (..))
5253import qualified Data.FastMutableIntMap as FastMutableIntMap
5354import Data.Foldable hiding (concat, elem, sequence_)
@@ -2739,7 +2740,7 @@ instance HasSpiderTimeline x => R.Reflex (SpiderTimeline x) where
27392740 fanG e = R.EventSelectorG $ SpiderEvent . selectG (fanG (unSpiderEvent e))
27402741 {-# INLINABLE mergeG #-}
27412742 mergeG
2742− :: forall (k :: k2 -> *) q (v :: k2 -> *). GCompare k
2743+ :: forall k2 (k :: k2 -> *) q (v :: k2 -> *). GCompare k
27432744 => (forall a. q a -> R.Event (SpiderTimeline x) (v a))
27442745 -> DMap k q
27452746 -> R.Event (SpiderTimeline x) (DMap k v)
test/GC.hs+1
@@ -18,6 +18,7 @@ import Data.GADT.Compare
1818import Data.IORef
1919import Data.Semigroup
2020import Data.These
21+import Data.Type.Equality ((:~:)(Refl))
2122
2223import Data.Functor.Misc
2324import Data.Patch
test/Reflex/Test/CrossImpl.hs+1−1
@@ -26,7 +26,7 @@ import qualified Reflex.Profiled as Prof
2626import Control.Arrow (second, (&&&))
2727import Control.Monad.Identity hiding (forM, forM_, mapM, mapM_, sequence, sequence_)
2828import Control.Monad.State.Strict hiding (forM, forM_, mapM, mapM_, sequence, sequence_)
29−import Data.Dependent.Map (DSum (..))
29+import Data.Dependent.Sum (DSum (..))
3030import Data.Foldable
3131import Data.Map.Strict (Map)
3232import qualified Data.Map.Strict as Map
test/hlint.hs+2−1
@@ -1,7 +1,7 @@
11module Main where
22
33import Control.Monad
4−import Language.Haskell.HLint3 (hlint)
4+import Language.Haskell.HLint (hlint)
55import System.Directory
66import System.Exit (exitFailure, exitSuccess)
77import System.FilePath
@@ -22,6 +22,7 @@ main = do
2222 , "--ignore=Use unless"
2323 , "--ignore=Reduce duplication"
2424 , "--cpp-define=USE_TEMPLATE_HASKELL"
25+ , "--cpp-define=DEBUG"
2526 , "--ignore=Use tuple-section"
2627 ]
2728 recurseInto = and <$> sequence