on develop help sign in
Merge remote-tracking branch 'origin/develop' into requester-simple-fix-nonempty-deferred
commitc6982fb08f686fa4eddb78f4ac97595ba900eb46 authorJoe Betz <joebetz91@gmail.com> dateTue 7 Jan 2020, 16:42 (7 years ago) parent063e840db8eb1a
20 files changed+123−67
.travis.yml+3−1 ChangeLog.md+24−8 Quickref.md+14−11 cabal.haskell-ci+1 dep/reflex-platform/github.json+3−3 reflex.cabal+7−8 release.nix+30−17 src/Control/Monad/ReaderIO.hs+1−1 src/Data/AppendMap.hs+1−1 src/Data/Functor/Misc.hs+1 src/Reflex/Class.hs+6−2 src/Reflex/Collection.hs+1−1 src/Reflex/Dynamic.hs+2−1 src/Reflex/DynamicWriter/Class.hs−1 src/Reflex/Network.hs+1−1 src/Reflex/PerformEvent/Base.hs+1−1 src/Reflex/Spider/Internal.hs+25−1 src/Reflex/Workflow.hs+1−1 test/Reflex/Bench/Focused.hs+1−1 test/hlint.hs−7
.travis.yml+3−1
@@ -29,6 +29,8 @@ matrix:
2929 include:
3030 - compiler: ghcjs-8.4
3131 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"]}}
3234 - compiler: ghc-8.6.5
3335 addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
3436 - compiler: ghc-8.4.4
@@ -163,7 +165,7 @@ script:
163165 # Constraint set no-th
164166 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='reflex -use-template-haskell' all | color_cabal_output
165167 # Constraint set old-these
166− - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output
168+ - if $GHCJS || ! $GHCJS && [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='these <1' all | color_cabal_output ; fi
167169 # Constraint set old-witherable
168170 - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='witherable <0.3.2' all | color_cabal_output
169171
ChangeLog.md+24−8
@@ -1,12 +1,16 @@
11# Revision history for reflex
22
3−## Unreleased
3+## 0.6.3
4+
5+* `Data.WeakBag.traverse` and `Data.FastWeakBag.traverse` have been deprecated.
6+ They are replaced with `Data.WeakBag.traverse_` and `Data.FastWeakBag.traverse_`, respectively.
47
5−* Data.WeakBag.traverse and Data.FastWeakBag.traverse have been
6− renamed to Data.WeakBag.traverse_ and Data.FastWeakBag.traverse_
7− respectively.
88* Fixes a bug in `Reflex.Patch.MapWithMove.patchThatSortsMapWith` that was producing invalid `PatchMapWithMove`.
99
10+* Add missing `NotReady` instances:
11+ - `instance NotReady (SpiderTimeline x) (SpiderHost x)`
12+ - `instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x))`
13+
1014## 0.6.2.4
1115
1216* Update to monoidal-containers 0.6
@@ -18,7 +22,9 @@
1822## 0.6.2.2
1923
2024* Support these >= 1. Add `split-these` flag to control whether to use new these/semialign combination or not.
25+
2126* Update version bounds to fix some CI failures
27+
2228* Add travis CI configuration
2329
2430## 0.6.2.1
@@ -33,32 +39,42 @@
3339 * Add incrementalCoercion/coerceIncremental to go with dynamicCoercion/coerceDynamic
3440
3541* Generalize merging functions:
36− `merge` to `mergeG`,
37− `mergeIncremental` to `mergeIncrementalG`,
38− `mergeIncrementalWithMove` to `mergeIncrementalWithMoveG`.
42+ `merge` to `mergeG`,
43+ `mergeIncremental` to `mergeIncrementalG`,
44+ `mergeIncrementalWithMove` to `mergeIncrementalWithMoveG`.
3945
4046* Generalize distribute function:
4147 `distributeDMapOverDynPure` to `distributeDMapOverDynPureG`,
4248
4349## 0.6.2.0
4450
45−* Fix `holdDyn` so that it is lazy in its event argument
51+* Fix `holdDyn` so that it is lazy in its event argument
4652 These produce `DMap`s whose values needn't be `Identity`.
53+
4754* Stop using the now-deprecated `*Tag` classes (e.g., `ShowTag`).
55+
4856* Fix `holdDyn` so that it is lazy in its event argument.
4957
5058## 0.6.1.0
5159
5260* Re-export all of `Data.Map.Monoidal`
61+
5362* Fix `QueryT` and `RequesterT` tests
5463
5564## 0.6.0.0 -- 2019-03-20
5665
5766* Deprecate `FunctorMaybe` in favor of `Data.Witherable.Filterable`. We still export `fmapMaybe`, `ffilter`, etc., but they all rely on `Filterable` now.
67+
5868* Rename `MonadDynamicWriter` to `DynamicWriter` and add a deprecation for the old name.
69+
5970* Remove many deprecated functions.
71+
6072* Add a `Num` instance for `Dynamic`.
73+
6174* Add `matchRequestsWithResponses` to make it easier to use `Requester` with protocols that don't do this matching for you.
75+
6276* Add `withRequesterT` to map functions over the request and response of a `RequesterT`.
77+
6378* Suppress nil patches in `QueryT` as an optimization. The `Query` type must now have an `Eq` instance.
79+
6480* Add `throttleBatchWithLag` to `Reflex.Time`. See that module for details.
Quickref.md+14−11
@@ -198,7 +198,7 @@ For Events, the returned Event fires whenever the latest Event supplied by the w
198198The functions mentioned above are used to create a static FRP network.
199199There 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.
@@ -206,7 +206,7 @@ Th typeclasses and their associated annotations include:
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+1
@@ -10,6 +10,7 @@ constraint-set no-th
1010 constraints: reflex -use-template-haskell
1111
1212constraint-set old-these
13+ ghc: <8.8
1314 constraints: these <1
1415
1516constraint-set old-witherable
dep/reflex-platform/github.json+3−3
@@ -1,7 +1,7 @@
11{
22 "owner": "reflex-frp",
33 "repo": "reflex-platform",
4− "branch": "jailbreakTheselens",
5− "rev": "4284ed527c96c373538dc7e31776d9a50ca6aa91",
6− "sha256": "1m1nkxq7ng9wnqbd77xn8d81f2iz8g61y5m0r3gp0gi0q59jm8ay"
4+ "branch": "develop",
5+ "rev": "e7b76dd552a10916c7d8702c11292dac4f4299ea",
6+ "sha256": "0s1183arrwldcs50qhzgnv94v24n9bgq6dfq64wp0a3q2nzyvgwh"
77}
reflex.cabal+7−8
@@ -1,5 +1,5 @@
11Name: reflex
2−Version: 0.6.2.4
2+Version: 0.6.3
33Synopsis: Higher-order Functional Reactive Programming
44Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
55License: BSD3
@@ -18,7 +18,7 @@ extra-source-files:
1818 ChangeLog.md
1919
2020tested-with:
21− GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5,
21+ GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.1,
2222 GHCJS ==8.4
2323
2424flag use-reflex-optimizer
@@ -50,7 +50,7 @@ library
5050 hs-source-dirs: src
5151 build-depends:
5252 MemoTrie == 0.6.*,
53− base >= 4.9 && < 4.13,
53+ base >= 4.9 && < 4.14,
5454 bifunctors >= 5.2 && < 5.6,
5555 comonad >= 5.0.4 && < 5.1,
5656 constraints-extras >= 0.3 && < 0.4,
@@ -59,20 +59,19 @@ library
5959 dependent-map >= 0.3 && < 0.4,
6060 dlist == 0.8.*,
6161 exception-transformers == 0.4.*,
62− profunctors >= 5.3 && < 5.5,
6362 lens >= 4.7 && < 5,
6463 monad-control >= 1.0.1 && < 1.1,
6564 mtl >= 2.1 && < 2.3,
6665 prim-uniq >= 0.1.0.1 && < 0.2,
6766 primitive >= 0.5 && < 0.8,
68− profunctors,
67+ profunctors >= 5.3 && < 5.6,
6968 random == 1.1.*,
7069 ref-tf == 0.4.*,
7170 reflection == 2.1.*,
7271 semigroupoids >= 4.0 && < 6,
7372 stm >= 2.4 && < 2.6,
7473 syb >= 0.5 && < 0.8,
75− time >= 1.4 && < 1.9,
74+ time >= 1.4 && < 1.10,
7675 transformers >= 0.5.6.0 && < 0.6,
7776 unbounded-delays >= 0.1.0.0 && < 0.2,
7877 witherable >= 0.3 && < 0.3.2
@@ -161,9 +160,9 @@ library
161160 cpp-options: -DUSE_TEMPLATE_HASKELL
162161 build-depends:
163162 dependent-sum >= 0.6 && < 0.7,
164− haskell-src-exts >= 1.16 && < 1.22,
163+ haskell-src-exts >= 1.16 && < 1.23,
165164 haskell-src-meta >= 0.6 && < 0.9,
166− template-haskell >= 2.9 && < 2.15
165+ template-haskell >= 2.9 && < 2.16
167166 exposed-modules:
168167 Reflex.Dynamic.TH
169168 other-extensions: TemplateHaskell
release.nix+30−17
@@ -17,26 +17,39 @@ let
1717 ] ++ lib.optionals (reflex-platform.iosSupport) [
1818 "ghcIosAarch64"
1919 ];
20− hsPkgs = lib.genAttrs compilers (ghc: let
21− ghc' = reflex-platform.${ghc}.override {
22− overrides = self: super: let
23− reflexSrc = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
24− "default.nix"
25− "release.nix"
26− ".git"
27− "dist"
28− ])) ./.;
29− in {
30− reflex-dontUseTemplateHaskell = self.callCabal2nixWithOptions "reflex" reflexSrc "-f -use-template-haskell" {};
31− reflex = self.callCabal2nixWithOptions "reflex" reflexSrc "-f +use-template-haskell" {};
20+ variations = map (v: "reflex" + v) [
21+ "-dontUseTemplateHaskell"
22+ ""
23+ ];
24+ compilerPkgs = lib.genAttrs compilers (ghc: let
25+ variationPkgs = lib.genAttrs variations (variation: let
26+ reflex-platform = reflex-platform-fun {
27+ inherit system;
28+ __useTemplateHaskell = variation == "reflex"; # TODO hack
29+ haskellOverlays = [
30+ # Use this package's source for reflex
31+ (self: super: {
32+ _dep = super._dep // {
33+ reflex = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
34+ "release.nix"
35+ ".git"
36+ "dist"
37+ "cabal.haskell-ci"
38+ "cabal.project"
39+ ".travis.yml"
40+ ])) ./.;
41+ };
42+ })
43+ ];
3244 };
33− };
34− in {
35− inherit (ghc') reflex reflex-dontUseTemplateHaskell;
45+ in reflex-platform.${ghc}.reflex);
46+ in variationPkgs // {
47+ cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}"
48+ (builtins.attrValues variationPkgs);
3649 });
37− in hsPkgs // {
50+ in compilerPkgs // {
3851 cache = reflex-platform.pinBuildInputs "reflex-${system}"
39− (lib.concatLists (map builtins.attrValues (builtins.attrValues hsPkgs)));
52+ (map (a: a.cache) (builtins.attrValues compilerPkgs));
4053 });
4154
4255 metaCache = native-reflex-platform.pinBuildInputs "reflex-everywhere"
src/Control/Monad/ReaderIO.hs+1−1
@@ -37,7 +37,7 @@ instance Applicative (ReaderIO e) where
3737#if MIN_VERSION_base(4,10,0)
3838 liftA2 = liftM2
3939 {-# INLINE liftA2 #-}
40−#endif
40+#endif
4141 (*>) = (>>)
4242 {-# INLINE (*>) #-}
4343
src/Data/AppendMap.hs+1−1
@@ -20,7 +20,7 @@ module Data.AppendMap
2020 , module Data.Map.Monoidal
2121 ) where
2222
23−import Prelude hiding (map, null)
23+import Prelude hiding (null)
2424
2525import Data.Coerce
2626import Data.Default
src/Data/Functor/Misc.hs+1
@@ -53,6 +53,7 @@ import Data.Map (Map)
5353import qualified Data.Map as Map
5454import Data.Some (Some(Some))
5555import Data.These
56+import Data.Type.Equality ((:~:)(Refl))
5657import Data.Typeable hiding (Refl)
5758
5859--------------------------------------------------------------------------------
src/Reflex/Class.hs+6−2
@@ -202,7 +202,7 @@ import Data.Dependent.Map (DMap, DSum (..))
202202import qualified Data.Dependent.Map as DMap
203203import Data.Functor.Compose
204204import Data.Functor.Product
205−import Data.GADT.Compare (GEq (..), GCompare (..), (:~:) (..))
205+import Data.GADT.Compare (GEq (..), GCompare (..))
206206import Data.FastMutableIntMap (PatchIntMap)
207207import Data.Foldable
208208import Data.Functor.Bind
@@ -218,6 +218,7 @@ import Data.Some (Some(Some))
218218import Data.String
219219import Data.These
220220import Data.Type.Coercion
221+import Data.Type.Equality ((:~:) (..))
221222import Data.Witherable (Filterable(..))
222223import qualified Data.Witherable as W
223224import Reflex.FunctorMaybe (FunctorMaybe)
@@ -289,7 +290,8 @@ class ( MonadHold t (PushM t)
289290 -- | Create an 'Event' that will occur whenever the currently-selected input
290291 -- 'Event' occurs
291292 switch :: Behavior t (Event t a) -> Event t a
292− -- | Create an 'Event' that will occur whenever the input event is occurring -- and its occurrence value, another 'Event', is also occurring
293+ -- | Create an 'Event' that will occur whenever the input event is occurring -- and its occurrence value, another 'Event', is also occurring.
294+ -- You maybe looking for '@switchHold@ @never@' instead.
293295 coincidence :: Event t (Event t a) -> Event t a
294296 -- | Extract the 'Behavior' of a 'Dynamic'.
295297 current :: Dynamic t a -> Behavior t a
@@ -665,7 +667,9 @@ instance Reflex t => Monad (Behavior t) where
665667 a >>= f = pull $ sample a >>= sample . f
666668 -- Note: it is tempting to write (_ >> b = b); however, this would result in (fail x >> return y) succeeding (returning y), which violates the law that (a >> b = a >>= \_ -> b), since the implementation of (>>=) above actually will fail. Since we can't examine 'Behavior's other than by using sample, I don't think it's possible to write (>>) to be more efficient than the (>>=) above.
667669 return = constant
670+#if !MIN_VERSION_base(4,13,0)
668671 fail = error "Monad (Behavior t) does not support fail"
672+#endif
669673
670674instance (Reflex t, Monoid a) => Monoid (Behavior t a) where
671675 mempty = constant mempty
src/Reflex/Collection.hs+1−1
@@ -130,7 +130,7 @@ listWithKeyShallowDiff initialVals valsChanged mkChild = do
130130 Nothing -> Just Nothing
131131
132132 -- We don't want to let spurious re-creations of items through
133− Just _ -> Nothing
133+ Just _ -> Nothing
134134 listHoldWithKey
135135 initialVals
136136 (attachWith (flip (Map.differenceWith relevantPatch))
src/Reflex/Dynamic.hs+2−1
@@ -86,11 +86,12 @@ import Data.Align
8686import Data.Dependent.Map (DMap)
8787import qualified Data.Dependent.Map as DMap
8888import Data.Dependent.Sum (DSum (..))
89−import Data.GADT.Compare ((:~:) (..), GCompare (..), GEq (..), GOrdering (..))
89+import Data.GADT.Compare (GCompare (..), GEq (..), GOrdering (..))
9090import Data.Map (Map)
9191import Data.Maybe
9292import Data.Monoid ((<>))
9393import Data.These
94+import Data.Type.Equality ((:~:) (..))
9495
9596import Debug.Trace
9697
src/Reflex/DynamicWriter/Class.hs−1
@@ -26,4 +26,3 @@ class (Monad m, Monoid w) => DynamicWriter t w m | m -> t w where
2626
2727instance DynamicWriter t w m => DynamicWriter t w (ReaderT r m) where
2828 tellDyn = lift . tellDyn
29−
src/Reflex/Network.hs+1−1
@@ -20,7 +20,7 @@ import Reflex.NotReady.Class
2020import Reflex.PostBuild.Class
2121
2222-- | A 'Dynamic' "network": Takes a 'Dynamic' of network-creating actions and replaces the network whenever the 'Dynamic' updates.
23−-- The returned Event of network results fires when the 'Dynamic' updates.
23+-- The returned Event of network results fires at post-build time and when the 'Dynamic' updates.
2424-- Note: Often, the type 'a' is an Event, in which case the return value is an Event-of-Events, where the outer 'Event' fires
2525-- when switching networks. Such an 'Event' would typically be flattened (via 'switchPromptly').
2626networkView :: (NotReady t m, Adjustable t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)
src/Reflex/PerformEvent/Base.hs+1−1
@@ -189,7 +189,7 @@ hostPerformEventT a = do
189189 case mToPerform of
190190 Nothing -> return [result']
191191 Just toPerform -> do
192− responses <- runHostFrame $ traverseRequesterData (Identity <$>) toPerform
192+ responses <- runHostFrame $ traverseRequesterData (fmap Identity) toPerform
193193 mrt <- readRef responseTrigger
194194 let followupEventTriggers = case mrt of
195195 Just rt -> [rt :=> Identity responses]
src/Reflex/Spider/Internal.hs+25−1
@@ -43,6 +43,8 @@ import Control.Monad.Reader.Class
4343import Control.Monad.IO.Class
4444import Control.Monad.ReaderIO
4545import Control.Monad.Ref
46+import Control.Monad.Fail (MonadFail)
47+import qualified Control.Monad.Fail as MonadFail
4648import Data.Align
4749import Data.Coerce
4850import Data.Dependent.Map (DMap, DSum (..))
@@ -63,6 +65,7 @@ import Data.Monoid ((<>))
6365import Data.Proxy
6466import Data.These
6567import Data.Traversable
68+import Data.Type.Equality ((:~:)(Refl))
6669import Data.Witherable (Filterable, mapMaybe)
6770import GHC.Exts
6871import GHC.IORef (IORef (..))
@@ -103,6 +106,7 @@ import qualified Reflex.Host.Class
103106import Reflex.NotReady.Class
104107import Reflex.Patch
105108import qualified Reflex.Patch.DMapWithMove as PatchDMapWithMove
109+import Reflex.PerformEvent.Base (PerformEventT)
106110
107111#ifdef DEBUG_TRACE_EVENTS
108112import qualified Data.ByteString.Char8 as BS8
@@ -971,8 +975,10 @@ instance Monad (BehaviorM x) where
971975 BehaviorM x >> BehaviorM y = BehaviorM $ x >> y
972976 {-# INLINE return #-}
973977 return x = BehaviorM $ return x
978+#if !MIN_VERSION_base(4,13,0)
974979 {-# INLINE fail #-}
975980 fail s = BehaviorM $ fail s
981+#endif
976982
977983data BehaviorSubscribed x a
978984 = forall p. BehaviorSubscribedHold (Hold x p)
@@ -2356,8 +2362,10 @@ instance HasSpiderTimeline x => Monad (Reflex.Class.Dynamic (SpiderTimeline x))
23562362 x >>= f = SpiderDynamic $ dynamicDynIdentity $ newJoinDyn $ newMapDyn (unSpiderDynamic . f) $ unSpiderDynamic x
23572363 {-# INLINE (>>) #-}
23582364 (>>) = (*>)
2365+#if !MIN_VERSION_base(4,13,0)
23592366 {-# INLINE fail #-}
23602367 fail _ = error "Dynamic does not support 'fail'"
2368+#endif
23612369
23622370{-# INLINABLE newJoinDyn #-}
23632371newJoinDyn :: HasSpiderTimeline x => DynamicS x (Identity (DynamicS x (Identity a))) -> Reflex.Spider.Internal.Dyn x (Identity a)
@@ -2636,8 +2644,14 @@ instance Monad (SpiderHost x) where
26362644 SpiderHost x >> SpiderHost y = SpiderHost $ x >> y
26372645 {-# INLINABLE return #-}
26382646 return x = SpiderHost $ return x
2647+#if !MIN_VERSION_base(4,13,0)
2648+ {-# INLINABLE fail #-}
2649+ fail = MonadFail.fail
2650+#endif
2651+
2652+instance MonadFail (SpiderHost x) where
26392653 {-# INLINABLE fail #-}
2640− fail s = SpiderHost $ fail s
2654+ fail s = SpiderHost $ MonadFail.fail s
26412655
26422656-- | Run an action affecting the global Spider timeline; this will be guarded by
26432657-- a mutex for that timeline
@@ -2659,8 +2673,10 @@ instance Monad (SpiderHostFrame x) where
26592673 SpiderHostFrame x >> SpiderHostFrame y = SpiderHostFrame $ x >> y
26602674 {-# INLINABLE return #-}
26612675 return x = SpiderHostFrame $ return x
2676+#if !MIN_VERSION_base(4,13,0)
26622677 {-# INLINABLE fail #-}
26632678 fail s = SpiderHostFrame $ fail s
2679+#endif
26642680
26652681instance NotReady (SpiderTimeline x) (SpiderHostFrame x) where
26662682 notReadyUntil _ = pure ()
@@ -2705,3 +2721,11 @@ instance MonadAtomicRef (SpiderHostFrame x) where
27052721instance PrimMonad (SpiderHostFrame x) where
27062722 type PrimState (SpiderHostFrame x) = PrimState IO
27072723 primitive = SpiderHostFrame . EventM . primitive
2724+
2725+instance NotReady (SpiderTimeline x) (SpiderHost x) where
2726+ notReadyUntil _ = return ()
2727+ notReady = return ()
2728+
2729+instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where
2730+ notReadyUntil _ = return ()
2731+ notReady = return ()
src/Reflex/Workflow.hs+1−1
@@ -34,7 +34,7 @@ workflow w0 = do
3434 rec eResult <- networkHold (unWorkflow w0) $ fmap unWorkflow $ switch $ snd <$> current eResult
3535 return $ fmap fst eResult
3636
37−-- | Similar to 'workflow', but outputs an 'Event' that fires whenever the current 'Workflow' is replaced by the next 'Workflow'.
37+-- | Similar to 'workflow', but outputs an 'Event' that fires at post-build time and whenever the current 'Workflow' is replaced by the next 'Workflow'.
3838workflowView :: forall t m a. (Reflex t, NotReady t m, Adjustable t m, MonadFix m, MonadHold t m, PostBuild t m) => Workflow t m a -> m (Event t a)
3939workflowView w0 = do
4040 rec eResult <- networkView . fmap unWorkflow =<< holdDyn w0 eReplace
test/Reflex/Bench/Focused.hs+1−1
@@ -134,7 +134,7 @@ holdDynChain :: (Reflex t, MonadHold t m) => Word -> Dynamic t Word -> m (Dynami
134134holdDynChain = iterM (\d -> sample (current d) >>= flip holdDyn (updated d))
135135
136136buildDynChain :: (Reflex t, MonadHold t m) => Word -> Dynamic t Word -> m (Dynamic t Word)
137−buildDynChain = iterM (\d -> do
137+buildDynChain = iterM (\d -> do
138138 let b = fmap (+1) (current d)
139139 e = fmap (*2) (updated d)
140140 buildDynamic (sample b) e)
test/hlint.hs−7
@@ -30,16 +30,9 @@ main = do
3030 ]
3131 matchFile = and <$> sequence
3232 [ extension ==? ".hs"
33− , let notElem' = liftOp notElem
34− in filePath `notElem'` filePathExceptions pwd
3533 ]
3634 files <- find recurseInto matchFile (pwd </> "src") --TODO: Someday fix all hints in tests, etc.
3735 ideas <- fmap concat $ forM files $ \f -> do
3836 putStr $ "linting file " ++ drop (length pwd + 1) f ++ "... "
3937 runHlint f
4038 if null ideas then exitSuccess else exitFailure
41−
42−filePathExceptions :: FilePath -> [FilePath]
43−filePathExceptions pwd = map (pwd </>) $
44− [ "src/Data/AppendMap.hs" -- parse error when hlint runs
45− ]