on develop help sign in
Merge branch 'develop' into cleanup-debug
commit711b0b495c26a3a9f4e69b421c299b8fbdcdc4ed authorOliver Batchelor <saulzar@gmail.com> dateTue 20 Aug 2019, 00:11 (7 years ago) parent724d4263a6f208
7 files changed+39−34
.travis.yml+19−30 cabal.haskell-ci+10−2 cabal.project.freeze+1 default.nix+1−1 reflex.cabal+1−1 src/Data/AppendMap.hs+2 test/Reflex/Test/CrossImpl.hs+5
.travis.yml+19−30
@@ -4,7 +4,7 @@
44#
55# For more information, see https://github.com/haskell-CI/haskell-ci
66#
7−# version: 0.3.20190804.2
7+# version: 0.3.20190814
88#
99language: c
1010dist: xenial
@@ -25,12 +25,10 @@ before_cache:
2525 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
2626 - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
2727 - rm -rfv $CABALHOME/packages/head.hackage
28−
2928matrix:
3029 include:
3130 - compiler: ghcjs-8.4
32− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
33− env: GHCJS_PACKAGE="ghcjs-8.4"
31+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["cabal-install-3.0"]}}
3432 - compiler: ghc-8.6.5
3533 addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
3634 - compiler: ghc-8.4.4
@@ -39,18 +37,14 @@ matrix:
3937 addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
4038 - compiler: ghc-8.0.2
4139 addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
42− allow_failures:
43− - compiler: "ghcjs-8.4" # This hits the travis 50min time limit and fails
44−
4540before_install:
4641 - |
47− if [ "$TRAVIS_OS_NAME" = "linux" ] && [ ! -z "$GHCJS_PACKAGE" ]; then
48− curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -;
49− sudo sh -c "echo deb https://deb.nodesource.com/node_8.x xenial main > /etc/apt/sources.list.d/nodesource.list";
42+ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
5043 sudo add-apt-repository -y ppa:hvr/ghcjs;
44+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
45+ sudo apt-add-repository 'https://deb.nodesource.com/node_8.x xenial main'
5146 sudo apt-get update;
52− sudo apt-get install nodejs;
53− sudo apt-get install "$GHCJS_PACKAGE";
47+ sudo apt-get install $CC cabal-install-3.0 nodejs;
5448 fi
5549 - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
5650 - WITHCOMPILER="-w $HC"
@@ -62,8 +56,8 @@ before_install:
6256 else
6357 GHCJS=false;
6458 fi
65− - if $GHCJS ; then sudo apt-get install -y ghc-8.6.5 ; fi
66− - if $GHCJS ; then PATH="/opt/ghc/8.6.5/bin:$PATH" ; fi
59+ - if $GHCJS ; then sudo apt-get install -y ghc-8.4.4 ; fi
60+ - if $GHCJS ; then PATH="/opt/ghc/8.4.4/bin:$PATH" ; fi
6761 - HCPKG="$HC-pkg"
6862 - unset CC
6963 - CABAL=/opt/ghc/bin/cabal
@@ -99,6 +93,7 @@ install:
9993 - echo $GHCJS
10094 - TEST=--enable-tests
10195 - BENCH=--enable-benchmarks
96+ - BENCH=--disable-benchmarks
10297 - HEADHACKAGE=false
10398 - rm -f $CABALHOME/config
10499 - |
@@ -120,20 +115,19 @@ install:
120115 - cat $CABALHOME/config
121116 - rm -fv cabal.project cabal.project.local cabal.project.freeze
122117 - travis_retry ${CABAL} v2-update -v
123− - if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.6.5 happy) ; fi
118+ - if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.4.4 happy) ; fi
124119 # Generate cabal.project
125120 - rm -rf cabal.project cabal.project.local cabal.project.freeze
126121 - touch cabal.project
127122 - |
128123 echo "packages: ." >> cabal.project
124+ - |
129125 - cat cabal.project || true
130126 - cat cabal.project.local || true
131127 - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
132128 - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
133− - ${CABAL} v2-configure $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
134129 - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
135− - rm cabal.project.freeze || true
136− - rm cabal.project.local || true
130+ - rm cabal.project.freeze
137131script:
138132 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
139133 # Packaging...
@@ -152,7 +146,6 @@ script:
152146 - |
153147 - cat cabal.project || true
154148 - cat cabal.project.local || true
155− - rm cabal.project.local || true
156149 # Building...
157150 # this builds all libraries and executables (without tests/benchmarks)
158151 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
@@ -160,23 +153,19 @@ script:
160153 # build & run tests, build benchmarks
161154 - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
162155 # Testing...
163− - if ! $GHCJS && [ $HCNUMVER -ge 80000 ] && [ $HCNUMVER -lt 80606 ] ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
156+ - if ! $GHCJS ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
164157 # cabal check...
165158 - (cd ${PKGDIR_reflex} && ${CABAL} -vnormal check)
166159 # haddock...
167− - if ! $GHCJS && [ $HCNUMVER -ge 80000 ] && [ $HCNUMVER -lt 80606 ] ; then ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
168− # Building without installed constraints for packages in global-db...
169− - rm -f cabal.project.local || true
170− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
160+ - if ! $GHCJS ; then ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
171161 # Constraint sets
172− - rm -rf cabal.project.local || true
162+ - rm -rf cabal.project.local
173163 # Constraint set no-th
174164 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
175− # Constraint sets
176− - rm -rf cabal.project.local || true
177− # Constraint set don't use split these/semialign
178− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -split-these' all | color_cabal_output
165+ # Constraint set old-these
166+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output
167+ # Constraint set old-witherable
168+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
179169
180170# REGENDATA ["--config=cabal.haskell-ci","cabal.project"]
181171# EOF
182−
cabal.haskell-ci+10−2
@@ -1,8 +1,16 @@
1−distribution: xenial
1+distribution: xenial
2+benchmarks: False
3+unconstrained: False
4+installed: -all
25
36-- https://github.com/haskell/cabal/issues/6106
47install-dependencies: False
5−benchmarks: False
68
79constraint-set no-th
810 constraints: reflex -use-template-haskell
11+
12+constraint-set old-these
13+ constraints: these <1
14+
15+constraint-set old-witherable
16+ constraints: witherable <0.3.2
cabal.project.freezenew file+1
@@ -0,0 +1 @@
1+constraints: any.text < 1.2.4.0
default.nix+1−1
@@ -6,7 +6,7 @@
66, template-haskell , these, time, transformers
77, transformers-compat, unbounded-delays, prim-uniq
88, data-default, filepath, directory, filemanip, ghcjs-base
9−, monoidal-containers, witherable
9+, monoidal-containers, witherable, profunctors
1010, semialign ? null, splitThese ? (semialign != null)
1111, useTemplateHaskell ? true
1212}:
reflex.cabal+1−1
@@ -79,7 +79,7 @@ library
7979 time >= 1.4 && < 1.9,
8080 transformers >= 0.5.6.0 && < 0.6,
8181 unbounded-delays >= 0.1.0.0 && < 0.2,
82− witherable >= 0.2 && < 0.3
82+ witherable >= 0.2 && < 0.4
8383
8484 if flag(split-these)
8585 build-depends: these >= 1 && <1.1,
src/Data/AppendMap.hs+2
@@ -46,8 +46,10 @@ _unAppendMap = getMonoidalMap
4646pattern AppendMap :: Map k v -> MonoidalMap k v
4747pattern AppendMap m = MonoidalMap m
4848
49+#if !MIN_VERSION_witherable(0,3,2)
4950instance W.Filterable (MonoidalMap k) where
5051 mapMaybe = mapMaybe
52+#endif
5153
5254-- | Deletes a key, returning 'Nothing' if the result is empty.
5355nonEmptyDelete :: Ord k => k -> MonoidalMap k a -> Maybe (MonoidalMap k a)
test/Reflex/Test/CrossImpl.hs+5
@@ -218,6 +218,11 @@ testCases =
218218 bb <- hold b $ pushAlways (const $ hold "asdf" eo) eo
219219 let b' = pull $ sample =<< sample bb
220220 return (b', e)
221+ , (,) "foldDynWhileFiring" $ TestCase (Map.singleton 0 "zxc", Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(_, e) -> do
222+ d <- foldDyn (:) [] $
223+ pushAlways (\a -> foldDyn (:) [a] e) e
224+ let b = current (join (fmap distributeListOverDynPure d))
225+ return (b, e)
221226 , (,) "joinDyn" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
222227 bb <- hold "b" e
223228 bd <- hold never . fmap (const e) =<< headE e