Skip to content

Commit f61a68d

Browse files
authored
Merge branch 'develop' into no-hlint-exceptions
2 parents 089d4e1 + ba7efb1 commit f61a68d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+981
-535
lines changed

.travis.yml

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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.6.5
33+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
34+
- compiler: ghc-8.4.4
35+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
36+
- compiler: ghc-8.2.2
37+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
38+
- compiler: ghc-8.0.2
39+
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
40+
before_install:
41+
- |
42+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
43+
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'
46+
sudo apt-get update;
47+
sudo apt-get install $CC cabal-install-3.0 nodejs;
48+
fi
49+
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
50+
- WITHCOMPILER="-w $HC"
51+
- |
52+
if echo $CC | grep -q ghcjs; then
53+
GHCJS=true
54+
HC=${HC}js
55+
WITHCOMPILER="--ghcjs ${WITHCOMPILER}js"
56+
else
57+
GHCJS=false;
58+
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
61+
- HCPKG="$HC-pkg"
62+
- unset CC
63+
- CABAL=/opt/ghc/bin/cabal
64+
- CABALHOME=$HOME/.cabal
65+
- export PATH="$CABALHOME/bin:$PATH"
66+
- TOP=$(pwd)
67+
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
68+
- echo $HCNUMVER
69+
- CABAL="$CABAL -vnormal+nowrap+markoutput"
70+
- set -o pipefail
71+
- |
72+
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
73+
echo 'BEGIN { state = "output"; }' >> .colorful.awk
74+
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
75+
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
76+
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
77+
echo ' if (state == "cabal") {' >> .colorful.awk
78+
echo ' print blue($0)' >> .colorful.awk
79+
echo ' } else {' >> .colorful.awk
80+
echo ' print $0' >> .colorful.awk
81+
echo ' }' >> .colorful.awk
82+
echo '}' >> .colorful.awk
83+
- cat .colorful.awk
84+
- |
85+
color_cabal_output () {
86+
awk -f $TOP/.colorful.awk
87+
}
88+
- echo text | color_cabal_output
89+
install:
90+
- ${CABAL} --version
91+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
92+
- node --version
93+
- echo $GHCJS
94+
- TEST=--enable-tests
95+
- BENCH=--enable-benchmarks
96+
- BENCH=--disable-benchmarks
97+
- HEADHACKAGE=false
98+
- rm -f $CABALHOME/config
99+
- |
100+
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
101+
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
102+
echo "write-ghc-environment-files: always" >> $CABALHOME/config
103+
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
104+
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
105+
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
106+
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
107+
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
108+
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
109+
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
110+
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
111+
echo "install-dirs user" >> $CABALHOME/config
112+
echo " prefix: $CABALHOME" >> $CABALHOME/config
113+
echo "repository hackage.haskell.org" >> $CABALHOME/config
114+
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
115+
- cat $CABALHOME/config
116+
- rm -fv cabal.project cabal.project.local cabal.project.freeze
117+
- travis_retry ${CABAL} v2-update -v
118+
- if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.4.4 happy) ; fi
119+
# Generate cabal.project
120+
- rm -rf cabal.project cabal.project.local cabal.project.freeze
121+
- touch cabal.project
122+
- |
123+
echo "packages: ." >> cabal.project
124+
- |
125+
- cat cabal.project || true
126+
- cat cabal.project.local || true
127+
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
128+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
129+
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
130+
- rm cabal.project.freeze
131+
script:
132+
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
133+
# Packaging...
134+
- ${CABAL} v2-sdist all | color_cabal_output
135+
# Unpacking...
136+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
137+
- cd ${DISTDIR} || false
138+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
139+
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
140+
- PKGDIR_reflex="$(find . -maxdepth 1 -type d -regex '.*/reflex-[0-9.]*')"
141+
# Generate cabal.project
142+
- rm -rf cabal.project cabal.project.local cabal.project.freeze
143+
- touch cabal.project
144+
- |
145+
echo "packages: ${PKGDIR_reflex}" >> cabal.project
146+
- |
147+
- cat cabal.project || true
148+
- cat cabal.project.local || true
149+
# Building...
150+
# this builds all libraries and executables (without tests/benchmarks)
151+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
152+
# Building with tests and benchmarks...
153+
# build & run tests, build benchmarks
154+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
155+
# Testing...
156+
- if ! $GHCJS ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
157+
# cabal check...
158+
- (cd ${PKGDIR_reflex} && ${CABAL} -vnormal check)
159+
# haddock...
160+
- if ! $GHCJS ; then ${CABAL} v2-haddock $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
161+
# Constraint sets
162+
- rm -rf cabal.project.local
163+
# Constraint set no-th
164+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' 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
169+
170+
# REGENDATA ["--config=cabal.haskell-ci","cabal.project"]
171+
# EOF

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Contributions and issue reports are encouraged and appreciated!
55
- [Opening Issues](#opening-issues)
66
- [Submitting Changes](#submitting-changes)
77
- [Guidelines for Commit Messages](#guidelines-for-commit-messages)
8+
- [Guidelines for Pull Requests](#guidelines-for-pull-requests)
89
- [Code Quality](#code-quality)
910
- [Documentation](#documentation)
1011

@@ -30,6 +31,10 @@ One way to think about it is that your commit message should be able to complete
3031
#### Body
3132
For breaking changes, new features, refactors, or other major changes, the body of the commit message should describe the motivation behind the change in greater detail and may include references to the issue tracker. The body shouldn't repeat code/comments from the diff.
3233

34+
### Guidelines for Pull Requests
35+
36+
Wherever possible, pull requests should add a single feature or fix a single bug. Pull requests should not bundle several unrelated changes.
37+
3338
### Code Quality
3439

3540
#### Warnings
@@ -40,6 +45,10 @@ Your pull request should add no new warnings to the project. It should also gene
4045

4146
Make sure the project builds and that the tests pass! This will generally also be checked by CI before merge, but trying it yourself first means you'll catch problems earlier and your contribution can be merged that much sooner!
4247

48+
#### Dependencies
49+
50+
Include version bounds whenever adding a dependency to the library stanza of the cabal file. Note that libraries added to reflex.cabal also need to be added to default.nix.
51+
4352
### Documentation
4453

4554
#### In the code

ChangeLog.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,80 @@
22

33
## Unreleased
44

5+
* Data.WeakBag.traverse and Data.FastWeakBag.traverse have been
6+
renamed to Data.WeakBag.traverse_ and Data.FastWeakBag.traverse_
7+
respectively.
8+
9+
* Fixes a bug in `Reflex.Patch.MapWithMove.patchThatSortsMapWith` that was producing invalid `PatchMapWithMove`.
10+
11+
* Add missing `NotReady` instances:
12+
- `instance NotReady (SpiderTimeline x) (SpiderHost x)`
13+
- `instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x))`
14+
15+
## 0.6.2.4
16+
17+
* Update to monoidal-containers 0.6
18+
19+
## 0.6.2.3
20+
21+
* Add an upper-bound to witherable
22+
23+
## 0.6.2.2
24+
25+
* Support these >= 1. Add `split-these` flag to control whether to use new these/semialign combination or not.
26+
27+
* Update version bounds to fix some CI failures
28+
29+
* Add travis CI configuration
30+
31+
## 0.6.2.1
32+
33+
* Generalize `fan` to `fanG` to take a `DMap` with non-`Identity`
34+
functor:
35+
* `fan` to `fanG`
36+
* `EventSelectorG` for `fanG` result selector.
37+
38+
* Reduce the amount of unsafeCoerce in coercing newtypes under Event/Dynamic/Behavior.
39+
* Add fused ReaderIO for the purpose of coercion (ReaderT's third argument has nominal role preventing automated coerce)
40+
* Add incrementalCoercion/coerceIncremental to go with dynamicCoercion/coerceDynamic
41+
42+
* Generalize merging functions:
43+
`merge` to `mergeG`,
44+
`mergeIncremental` to `mergeIncrementalG`,
45+
`mergeIncrementalWithMove` to `mergeIncrementalWithMoveG`.
46+
47+
* Generalize distribute function:
48+
`distributeDMapOverDynPure` to `distributeDMapOverDynPureG`,
49+
50+
## 0.6.2.0
51+
552
* Fix `holdDyn` so that it is lazy in its event argument
53+
These produce `DMap`s whose values needn't be `Identity`.
54+
55+
* Stop using the now-deprecated `*Tag` classes (e.g., `ShowTag`).
56+
57+
* Fix `holdDyn` so that it is lazy in its event argument.
658

759
## 0.6.1.0
860

961
* Re-export all of `Data.Map.Monoidal`
62+
1063
* Fix `QueryT` and `RequesterT` tests
1164

1265
## 0.6.0.0 -- 2019-03-20
1366

1467
* Deprecate `FunctorMaybe` in favor of `Data.Witherable.Filterable`. We still export `fmapMaybe`, `ffilter`, etc., but they all rely on `Filterable` now.
68+
1569
* Rename `MonadDynamicWriter` to `DynamicWriter` and add a deprecation for the old name.
70+
1671
* Remove many deprecated functions.
72+
1773
* Add a `Num` instance for `Dynamic`.
74+
1875
* Add `matchRequestsWithResponses` to make it easier to use `Requester` with protocols that don't do this matching for you.
76+
1977
* Add `withRequesterT` to map functions over the request and response of a `RequesterT`.
78+
2079
* Suppress nil patches in `QueryT` as an optimization. The `Query` type must now have an `Eq` instance.
80+
2181
* Add `throttleBatchWithLag` to `Reflex.Time`. See that module for details.

Quickref.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ For Events, the returned Event fires whenever the latest Event supplied by the w
198198
The functions mentioned above are used to create a static FRP network.
199199
There are additional typeclasses that can be used to modify the FRP network, to have it interact with IO action, or to introspect the building of the network.
200200

201-
Th typeclasses and their associated annotations include:
201+
The typeclasses and their associated annotations include:
202202

203203
- `PostBuild`
204204
Fire an Event when an FRP network has been set up.
205205
```haskell
206206
[B] -- Function runs in any monad supporting PostBuild
207207
```
208208

209-
- `Adjustable`
209+
- `Adjustable`
210210
Use Events to add or remove pieces of an FRP network.
211211
```haskell
212212
[A] -- Function runs in any monad supporting Adjustable
@@ -271,7 +271,7 @@ Th typeclasses and their associated annotations include:
271271
```haskell
272272
-- Run side-effecting actions in Event when it occurs; returned Event contains
273273
-- results. Side effects run in the (Performable m) monad which is associated with
274-
-- the (PerformEvent t m) typeclass constraint.
274+
-- the (PerformEvent t m) typeclass constraint.
275275
-- This allows for working with IO when a ((MonadIO (Performable m)) constraint is available.
276276
[P] performEvent :: Event (Performable m a ) -> m (Event a)
277277

@@ -295,17 +295,20 @@ Th typeclasses and their associated annotations include:
295295
## Networks
296296

297297
```haskell
298-
-- Functions from Reflex.Network used to deal with Dynamics/Events carrying (m a)
298+
-- Functions from Reflex.Adjustable / Reflex.Network used to deal with Dynamics/Events carrying (m a)
299299

300-
-- Given a Dynamic of network-creating actions, create a network that is recreated whenever the Dynamic updates.
301-
-- The returned Event of network results occurs when the Dynamic does. Note: Often, the type a is an Event,
300+
[A] runWithReplace :: m a -> Event t (m b) -> m (a, Event t b)
301+
302+
-- Given a Dynamic of network-creating actions, create a network that is recreated whenever the Dynamic updates.
303+
-- The returned Event of network results occurs when the Dynamic does. Note: Often, the type a is an Event,
302304
-- in which case the return value is an Event-of-Events that would typically be flattened (via switchHold).
303-
[P,A] networkView :: Dynamic (m a) -> m (Event a)
305+
[P,A] networkView :: Dynamic (m a) -> m (Event a)
304306

305-
-- Given an initial network and an Event of network-creating actions, create a network that is recreated whenever the
306-
-- Event fires. The returned Dynamic of network results occurs when the Event does. Note: Often, the type a is an
307+
-- Given an initial network and an Event of network-creating actions, create a network that is recreated whenever the
308+
-- Event fires. The returned Dynamic of network results occurs when the Event does. Note: Often, the type a is an
307309
-- Event, in which case the return value is a Dynamic-of-Events that would typically be flattened.
308-
[H,A] networkHold :: m a -> Event (m a) -> m (Dynamic a)
310+
[H,A] networkHold :: m a -> Event (m a) -> m (Dynamic a)
309311

310312
-- Render a placeholder network to be shown while another network is not yet done building
311-
[P,A] untilReady :: m a -> m b -> m (a, Event b)
313+
[P,A] untilReady :: m a -> m b -> m (a, Event b)
314+
```

cabal.haskell-ci

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
distribution: xenial
2+
benchmarks: False
3+
unconstrained: False
4+
installed: -all
5+
6+
-- https://github.com/haskell/cabal/issues/6106
7+
install-dependencies: False
8+
9+
constraint-set no-th
10+
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages: .

cabal.project.freeze

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
constraints: any.text < 1.2.4.0

default.nix

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)