packages feed

reflex 0.6.2.4 → 0.6.3

raw patch · 17 files changed

+117/−64 lines, 17 filesdep ~profunctorsdep ~semialignnew-uploader

Dependency ranges changed: profunctors, semialign

Files

ChangeLog.md view
@@ -1,5 +1,16 @@ # Revision history for reflex +## 0.6.3++* `Data.WeakBag.traverse` and `Data.FastWeakBag.traverse` have been deprecated.+  They are replaced with `Data.WeakBag.traverse_` and `Data.FastWeakBag.traverse_`, respectively.++* Fixes a bug in `Reflex.Patch.MapWithMove.patchThatSortsMapWith` that was producing invalid `PatchMapWithMove`.++* Add missing `NotReady` instances:+   - `instance NotReady (SpiderTimeline x) (SpiderHost x)`+   - `instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x))`+ ## 0.6.2.4  * Update to monoidal-containers 0.6@@ -11,7 +22,9 @@ ## 0.6.2.2  * Support these >= 1. Add `split-these` flag to control whether to use new these/semialign combination or not.+ * Update version bounds to fix some CI failures+ * Add travis CI configuration  ## 0.6.2.1@@ -26,32 +39,42 @@     * Add incrementalCoercion/coerceIncremental to go with dynamicCoercion/coerceDynamic  * Generalize merging functions:-  `merge` to `mergeG`, -  `mergeIncremental` to `mergeIncrementalG`, -  `mergeIncrementalWithMove` to `mergeIncrementalWithMoveG`.  +  `merge` to `mergeG`,+  `mergeIncremental` to `mergeIncrementalG`,+  `mergeIncrementalWithMove` to `mergeIncrementalWithMoveG`.  * Generalize distribute function:     `distributeDMapOverDynPure` to `distributeDMapOverDynPureG`,  ## 0.6.2.0 -* Fix `holdDyn` so that it is lazy in its event argument  +* Fix `holdDyn` so that it is lazy in its event argument   These produce `DMap`s  whose values needn't be `Identity`.+ * Stop using the now-deprecated `*Tag` classes (e.g., `ShowTag`).+ * Fix `holdDyn` so that it is lazy in its event argument.  ## 0.6.1.0  * Re-export all of `Data.Map.Monoidal`+ * Fix `QueryT` and `RequesterT` tests  ## 0.6.0.0 -- 2019-03-20  * Deprecate `FunctorMaybe` in favor of `Data.Witherable.Filterable`. We still export `fmapMaybe`, `ffilter`, etc., but they all rely on `Filterable` now.+ * Rename `MonadDynamicWriter` to `DynamicWriter` and add a deprecation for the old name.+ * Remove many deprecated functions.+ * Add a `Num` instance for `Dynamic`.+ * Add `matchRequestsWithResponses` to make it easier to use `Requester` with protocols that don't do this matching for you.+ * Add `withRequesterT` to map functions over the request and response of a `RequesterT`.+ * Suppress nil patches in `QueryT` as an optimization. The `Query` type must now have an `Eq` instance.+ * Add `throttleBatchWithLag` to `Reflex.Time`. See that module for details.
Quickref.md view
@@ -198,7 +198,7 @@ The functions mentioned above are used to create a static FRP network. 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. -Th typeclasses and their associated annotations include:+The typeclasses and their associated annotations include:  - `PostBuild`     Fire an Event when an FRP network has been set up.@@ -206,7 +206,7 @@     [B]   -- Function runs in any monad supporting PostBuild     ``` -- `Adjustable` +- `Adjustable`     Use Events to add or remove pieces of an FRP network.     ```haskell     [A]   -- Function runs in any monad supporting Adjustable@@ -271,7 +271,7 @@ ```haskell -- Run side-effecting actions in Event when it occurs; returned Event contains -- results. Side effects run in the (Performable m) monad which is associated with--- the (PerformEvent t m) typeclass constraint. +-- the (PerformEvent t m) typeclass constraint. -- This allows for working with IO when a ((MonadIO (Performable m)) constraint is available. [P]   performEvent        :: Event (Performable m a )                 -> m (Event a) @@ -295,17 +295,20 @@ ## Networks  ```haskell--- Functions from Reflex.Network used to deal with Dynamics/Events carrying (m a)+-- Functions from Reflex.Adjustable / Reflex.Network used to deal with Dynamics/Events carrying (m a) --- Given a Dynamic of network-creating actions, create a network that is recreated whenever the Dynamic updates. --- The returned Event of network results occurs when the Dynamic does. Note: Often, the type a is an Event, +[A]     runWithReplace :: m a -> Event t (m b) -> m (a, Event t b)++-- Given a Dynamic of network-creating actions, create a network that is recreated whenever the Dynamic updates.+-- The returned Event of network results occurs when the Dynamic does. Note: Often, the type a is an Event, -- in which case the return value is an Event-of-Events that would typically be flattened (via switchHold).-[P,A]   networkView :: Dynamic (m a) -> m (Event a) +[P,A]   networkView :: Dynamic (m a) -> m (Event a) --- Given an initial network and an Event of network-creating actions, create a network that is recreated whenever the --- Event fires. The returned Dynamic of network results occurs when the Event does. Note: Often, the type a is an +-- Given an initial network and an Event of network-creating actions, create a network that is recreated whenever the+-- Event fires. The returned Dynamic of network results occurs when the Event does. Note: Often, the type a is an -- Event, in which case the return value is a Dynamic-of-Events that would typically be flattened.-[H,A]   networkHold :: m a -> Event (m a) -> m (Dynamic a) +[H,A]   networkHold :: m a -> Event (m a) -> m (Dynamic a)  -- Render a placeholder network to be shown while another network is not yet done building-[P,A]   untilReady :: m a -> m b -> m (a, Event b) +[P,A]   untilReady :: m a -> m b -> m (a, Event b)+```
reflex.cabal view
@@ -1,5 +1,5 @@ Name: reflex-Version: 0.6.2.4+Version: 0.6.3 Synopsis: Higher-order Functional Reactive Programming Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system License: BSD3@@ -58,13 +58,12 @@     data-default >= 0.5 && < 0.8,     dependent-map >= 0.3 && < 0.4,     exception-transformers == 0.4.*,-    profunctors >= 5.3 && < 5.5,     lens >= 4.7 && < 5,     monad-control >= 1.0.1 && < 1.1,     mtl >= 2.1 && < 2.3,     prim-uniq >= 0.1.0.1 && < 0.2,     primitive >= 0.5 && < 0.8,-    profunctors,+    profunctors >= 5.3 && < 5.5,     random == 1.1.*,     ref-tf == 0.4.*,     reflection == 2.1.*,@@ -78,7 +77,7 @@    if flag(split-these)     build-depends:     these >= 1 && <1.1,-                       semialign >=1 && <1.1,+                       semialign >=1 && <1.2,                        monoidal-containers >= 0.6 && < 0.7   else     build-depends:     these >= 0.4 && <0.9,
src/Control/Monad/ReaderIO.hs view
@@ -37,7 +37,7 @@ #if MIN_VERSION_base(4,10,0)   liftA2 = liftM2   {-# INLINE liftA2 #-}-#endif  +#endif   (*>) = (>>)   {-# INLINE (*>) #-} 
src/Data/AppendMap.hs view
@@ -20,7 +20,7 @@   , module Data.Map.Monoidal   ) where -import Prelude hiding (map, null)+import Prelude hiding (null)  import Data.Coerce import Data.Default@@ -32,7 +32,9 @@ #endif import qualified Data.Witherable as W import Data.Map.Monoidal+import qualified Data.Map.Monoidal as MonoidalMap + {-# DEPRECATED AppendMap "Use 'MonoidalMap' instead" #-} -- | AppendMap is a synonym for 'Data.Map.Monoidal.MonoidalMap' type AppendMap = MonoidalMap@@ -48,7 +50,7 @@  #if !MIN_VERSION_witherable(0,3,2) instance W.Filterable (MonoidalMap k) where-  mapMaybe = mapMaybe+  mapMaybe = MonoidalMap.mapMaybe #endif  -- | Deletes a key, returning 'Nothing' if the result is empty.
src/Data/FastWeakBag.hs view
@@ -18,6 +18,7 @@   , isEmpty   , insert   , traverse+  , traverse_   , remove   -- * Internal functions   -- These will not always be available.@@ -116,14 +117,14 @@ isEmpty bag = {-# SCC "isEmpty" #-} IntMap.null <$> readIORef (_weakBag_children bag) #endif -{-# INLINE traverse #-}+{-# INLINE traverse_ #-} -- | Visit every node in the given list.  If new nodes are appended during the -- traversal, they will not be visited.  Every live node that was in the list -- when the traversal began will be visited exactly once; however, no guarantee -- is made about the order of the traversal.-traverse :: forall a m. MonadIO m => FastWeakBag a -> (a -> m ()) -> m ()+traverse_ :: forall a m. MonadIO m => FastWeakBag a -> (a -> m ()) -> m () #ifdef GHCJS_FAST_WEAK-traverse wb f = do+traverse_ wb f = do   let go cursor = when (not $ js_isNull cursor) $ do         val <- liftIO $ js_getTicketValue cursor         f $ unsafeFromRawJSVal val@@ -134,12 +135,16 @@ --TODO: Fix the race condition where if a cursor is deleted (presumably using 'remove', below) while we're holding it, it can't find its way back to the correct bag foreign import javascript unsafe "(function(){ for(var i = $1.pos - 1; i >= 0; i--) { if($1.bag.tickets[i] !== null) { return $1.bag.tickets[i]; } }; return null; })()" js_getNext :: FastWeakBagTicket a -> IO JSVal --TODO: Clean up as we go along so this isn't O(n) every time -- Result can be null or a FastWeakBagTicket a #else-traverse (FastWeakBag _ children) f = {-# SCC "traverse" #-} do+traverse_ (FastWeakBag _ children) f = {-# SCC "traverse_" #-} do   cs <- liftIO $ readIORef children   forM_ cs $ \c -> do     ma <- liftIO $ deRefWeak c     mapM_ f ma #endif++{-# DEPRECATED traverse "Use 'traverse_' instead" #-}+traverse :: forall a m. MonadIO m => FastWeakBag a -> (a -> m ()) -> m ()+traverse = traverse_  -- | Remove an item from the 'FastWeakBag'; does nothing if invoked multiple times -- on the same 'FastWeakBagTicket'.
src/Data/WeakBag.hs view
@@ -15,6 +15,7 @@   , singleton   , insert   , traverse+  , traverse_   , remove   -- * Internal functions   -- These will not always be available.@@ -99,17 +100,21 @@   ticket <- insert a bag wbRef finalizer   return (bag, ticket) -{-# INLINE traverse #-}+{-# INLINE traverse_ #-} -- | Visit every node in the given list.  If new nodes are appended during the -- traversal, they will not be visited.  Every live node that was in the list -- when the traversal began will be visited exactly once; however, no guarantee -- is made about the order of the traversal.-traverse :: MonadIO m => WeakBag a -> (a -> m ()) -> m ()-traverse (WeakBag _ children) f = {-# SCC "traverse" #-} do+traverse_ :: MonadIO m => WeakBag a -> (a -> m ()) -> m ()+traverse_ (WeakBag _ children) f = {-# SCC "traverse" #-} do   cs <- liftIO $ readIORef children   forM_ cs $ \c -> do     ma <- liftIO $ deRefWeak c     mapM_ f ma++{-# DEPRECATED traverse "Use 'traverse_' instead" #-}+traverse :: MonadIO m => WeakBag a -> (a -> m ()) -> m ()+traverse = traverse_  -- | Remove an item from the 'WeakBag'; does nothing if invoked multiple times -- on the same 'WeakBagTicket'.
src/Reflex/Class.hs view
@@ -173,13 +173,16 @@   , slowHeadE   ) where -#if defined(MIN_VERSION_semialign)+#ifdef MIN_VERSION_semialign import Prelude hiding (zip, zipWith)  #if MIN_VERSION_these(0,8,0) import Data.These.Combinators (justThese) #endif+#if MIN_VERSION_semialign(1,1,0)+import Data.Zip (Zip (..)) #endif+#endif  import Control.Applicative import Control.Monad.Identity@@ -1077,7 +1080,10 @@ #endif   align = alignEventWithMaybe Just -#if defined(MIN_VERSION_semialign)+#ifdef MIN_VERSION_semialign+#if MIN_VERSION_semialign(1,1,0)+instance Reflex t => Zip (Event t) where+#endif   zip x y = mapMaybe justThese $ align x y #endif 
src/Reflex/Collection.hs view
@@ -27,9 +27,12 @@   , simpleList   ) where -#if defined(MIN_VERSION_semialign)+#ifdef MIN_VERSION_semialign import Prelude hiding (zip, zipWith)+#if MIN_VERSION_semialign(1,1,0)+import Data.Zip (Zip (..)) #endif+#endif  import Control.Monad.Identity import Data.Align@@ -127,7 +130,7 @@         Nothing -> Just Nothing          -- We don't want to let spurious re-creations of items through-        Just _  -> Nothing +        Just _  -> Nothing   listHoldWithKey       initialVals       (attachWith (flip (Map.differenceWith relevantPatch))
src/Reflex/DynamicWriter/Class.hs view
@@ -26,4 +26,3 @@  instance DynamicWriter t w m => DynamicWriter t w (ReaderT r m) where   tellDyn = lift . tellDyn-
src/Reflex/Network.hs view
@@ -20,7 +20,7 @@ import Reflex.PostBuild.Class  -- | A 'Dynamic' "network": Takes a 'Dynamic' of network-creating actions and replaces the network whenever the 'Dynamic' updates.--- The returned Event of network results fires when the 'Dynamic' updates.+-- The returned Event of network results fires at post-build time and when the 'Dynamic' updates. -- Note:  Often, the type 'a' is an Event, in which case the return value is an Event-of-Events, where the outer 'Event' fires -- when switching networks. Such an 'Event' would typically be flattened (via 'switchPromptly'). networkView :: (NotReady t m, Adjustable t m, PostBuild t m) => Dynamic t (m a) -> m (Event t a)
src/Reflex/Patch/MapWithMove.hs view
@@ -155,7 +155,7 @@           Just (from, to)         reverseMapping = Map.fromList $ catMaybes $ zipWith f unsorted sorted         g (to, _) (from, _) = if to == from then Nothing else-          let Just movingTo = Map.lookup from reverseMapping+          let Just movingTo = Map.lookup to reverseMapping           in Just (to, NodeInfo (From_Move from) $ Just movingTo)  -- | Create a 'PatchMapWithMove' that, if applied to the first 'Map' provided,
src/Reflex/PerformEvent/Base.hs view
@@ -141,7 +141,7 @@           case mToPerform of             Nothing -> return [result']             Just toPerform -> do-              responses <- runHostFrame $ traverseRequesterData (Identity <$>) toPerform+              responses <- runHostFrame $ traverseRequesterData (fmap Identity) toPerform               mrt <- readRef responseTrigger               let followupEventTriggers = case mrt of                     Just rt -> [rt :=> Identity responses]
src/Reflex/Spider/Internal.hs view
@@ -72,11 +72,14 @@ import System.Mem.Weak import Unsafe.Coerce -#if defined(MIN_VERSION_semialign)+#ifdef MIN_VERSION_semialign #if MIN_VERSION_these(0,8,0) import Data.These.Combinators (justThese) #endif+#if MIN_VERSION_semialign(1,1,0)+import Data.Zip (Zip (..)) #endif+#endif  #ifdef DEBUG_CYCLES import Control.Monad.State hiding (forM, forM_, mapM, mapM_, sequence)@@ -100,6 +103,7 @@ import Reflex.NotReady.Class import Reflex.Patch import qualified Reflex.Patch.DMapWithMove as PatchDMapWithMove+import Reflex.PerformEvent.Base (PerformEventT)  #ifdef DEBUG_TRACE_EVENTS import qualified Data.ByteString.Char8 as BS8@@ -329,9 +333,9 @@                     scheduleClear occRef                     propagateFast a subscribers                 , subscriberInvalidateHeight = \old -> do-                    FastWeakBag.traverse subscribers $ invalidateSubscriberHeight old+                    FastWeakBag.traverse_ subscribers $ invalidateSubscriberHeight old                 , subscriberRecalculateHeight = \new -> do-                    FastWeakBag.traverse subscribers $ recalculateSubscriberHeight new+                    FastWeakBag.traverse_ subscribers $ recalculateSubscriberHeight new                 }               when (isJust occ) $ do                 liftIO $ writeIORef occRef occ -- Set the initial value of occRef; we don't need to do this if occ is Nothing@@ -447,12 +451,12 @@   , subscriberInvalidateHeight = \old -> do       when debugInvalidateHeight $ putStrLn $ "invalidateSubscriberHeight: SubscriberFan" <> showNodeId subscribed       subscribers <- readIORef $ fanSubscribedSubscribers subscribed-      forM_ (DMap.toList subscribers) $ \(_ :=> v) -> WeakBag.traverse (_fanSubscribedChildren_list v) $ invalidateSubscriberHeight old+      forM_ (DMap.toList subscribers) $ \(_ :=> v) -> WeakBag.traverse_ (_fanSubscribedChildren_list v) $ invalidateSubscriberHeight old       when debugInvalidateHeight $ putStrLn $ "invalidateSubscriberHeight: SubscriberFan" <> showNodeId subscribed <> " done"   , subscriberRecalculateHeight = \new -> do       when debugInvalidateHeight $ putStrLn $ "recalculateSubscriberHeight: SubscriberFan" <> showNodeId subscribed       subscribers <- readIORef $ fanSubscribedSubscribers subscribed-      forM_ (DMap.toList subscribers) $ \(_ :=> v) -> WeakBag.traverse (_fanSubscribedChildren_list v) $ recalculateSubscriberHeight new+      forM_ (DMap.toList subscribers) $ \(_ :=> v) -> WeakBag.traverse_ (_fanSubscribedChildren_list v) $ recalculateSubscriberHeight new       when debugInvalidateHeight $ putStrLn $ "recalculateSubscriberHeight: SubscriberFan" <> showNodeId subscribed <> " done"   } @@ -468,7 +472,7 @@       oldHeight <- readIORef $ switchSubscribedHeight subscribed       when (oldHeight /= invalidHeight) $ do         writeIORef (switchSubscribedHeight subscribed) $! invalidHeight-        WeakBag.traverse (switchSubscribedSubscribers subscribed) $ invalidateSubscriberHeight oldHeight+        WeakBag.traverse_ (switchSubscribedSubscribers subscribed) $ invalidateSubscriberHeight oldHeight       when debugInvalidateHeight $ putStrLn $ "invalidateSubscriberHeight: SubscriberSwitch" <> showNodeId subscribed <> " done"   , subscriberRecalculateHeight = \new -> do       when debugInvalidateHeight $ putStrLn $ "recalculateSubscriberHeight: SubscriberSwitch" <> showNodeId subscribed@@ -491,8 +495,8 @@         Nothing -> do           when (innerHeight > outerHeight) $ liftIO $ do -- If the event fires, it will fire at a later height             writeIORef (coincidenceSubscribedHeight subscribed) $! innerHeight-            WeakBag.traverse (coincidenceSubscribedSubscribers subscribed) $ invalidateSubscriberHeight outerHeight-            WeakBag.traverse (coincidenceSubscribedSubscribers subscribed) $ recalculateSubscriberHeight innerHeight+            WeakBag.traverse_ (coincidenceSubscribedSubscribers subscribed) $ invalidateSubscriberHeight outerHeight+            WeakBag.traverse_ (coincidenceSubscribedSubscribers subscribed) $ recalculateSubscriberHeight innerHeight         Just o -> do -- Since it's already firing, no need to adjust height           liftIO $ writeIORef (coincidenceSubscribedOccurrence subscribed) occ           scheduleClear $ coincidenceSubscribedOccurrence subscribed@@ -539,14 +543,14 @@ propagate a subscribers = withIncreasedDepth $ do   -- Note: in the following traversal, we do not visit nodes that are added to the list during our traversal; they are new events, which will necessarily have full information already, so there is no need to traverse them   --TODO: Should we check if nodes already have their values before propagating?  Maybe we're re-doing work-  WeakBag.traverse subscribers $ \s -> subscriberPropagate s a+  WeakBag.traverse_ subscribers $ \s -> subscriberPropagate s a  -- | Propagate everything at the current height propagateFast :: a -> FastWeakBag (Subscriber x a) -> EventM x () propagateFast a subscribers = withIncreasedDepth $ do   -- Note: in the following traversal, we do not visit nodes that are added to the list during our traversal; they are new events, which will necessarily have full information already, so there is no need to traverse them   --TODO: Should we check if nodes already have their values before propagating?  Maybe we're re-doing work-  FastWeakBag.traverse subscribers $ \s -> subscriberPropagate s a+  FastWeakBag.traverse_ subscribers $ \s -> subscriberPropagate s a  -------------------------------------------------------------------------------- -- EventSubscribed@@ -1163,7 +1167,10 @@   align ea eb = mapMaybe dmapToThese $ mergeG coerce $ dynamicConst $      DMap.fromDistinctAscList [LeftTag :=> ea, RightTag :=> eb] -#if defined(MIN_VERSION_semialign)+#ifdef MIN_VERSION_semialign+#if MIN_VERSION_semialign(1,1,0)+instance HasSpiderTimeline x => Zip (Event x) where+#endif   zip x y = mapMaybe justThese $ align x y #endif @@ -1521,15 +1528,15 @@             liftIO $ writeIORef (_fanInt_occRef self) m             scheduleIntClear $ _fanInt_occRef self             FastMutableIntMap.forIntersectionWithImmutable_ (_fanInt_subscribers self) m $ \b v -> do --TODO: Do we need to know that no subscribers are being added as we traverse?-              FastWeakBag.traverse b $ \s -> do+              FastWeakBag.traverse_ b $ \s -> do                 subscriberPropagate s v         , subscriberInvalidateHeight = \old -> do             FastMutableIntMap.for_ (_fanInt_subscribers self) $ \b -> do-              FastWeakBag.traverse b $ \s -> do+              FastWeakBag.traverse_ b $ \s -> do                 subscriberInvalidateHeight s old         , subscriberRecalculateHeight = \new -> do             FastMutableIntMap.for_ (_fanInt_subscribers self) $ \b -> do-              FastWeakBag.traverse b $ \s -> do+              FastWeakBag.traverse_ b $ \s -> do                 subscriberRecalculateHeight s new         }       liftIO $ do@@ -2201,7 +2208,7 @@     myHeight <- readIORef $ switchSubscribedHeight subscribed     when (parentHeight /= myHeight) $ do       writeIORef (switchSubscribedHeight subscribed) $! invalidHeight-      WeakBag.traverse (switchSubscribedSubscribers subscribed) $ invalidateSubscriberHeight myHeight+      WeakBag.traverse_ (switchSubscribedSubscribers subscribed) $ invalidateSubscriberHeight myHeight   mapM_ _someMergeUpdate_invalidateHeight mergeUpdates --TODO: In addition to when the patch is completely empty, we should also not run this if it has some Nothing values, but none of them have actually had any effect; potentially, we could even check for Just values with no effect (e.g. by comparing their IORefs and ignoring them if they are unchanged); actually, we could just check if the new height is different   forM_ coincidenceInfos $ \(SomeResetCoincidence subscription mcs) -> do     unsubscribe subscription@@ -2242,7 +2249,7 @@   oldHeight <- readIORef $ coincidenceSubscribedHeight subscribed   when (oldHeight /= invalidHeight) $ do     writeIORef (coincidenceSubscribedHeight subscribed) $! invalidHeight-    WeakBag.traverse (coincidenceSubscribedSubscribers subscribed) $ invalidateSubscriberHeight oldHeight+    WeakBag.traverse_ (coincidenceSubscribedSubscribers subscribed) $ invalidateSubscriberHeight oldHeight  updateSwitchHeight :: Height -> SwitchSubscribed x a -> IO () updateSwitchHeight new subscribed = do@@ -2250,7 +2257,7 @@   when (oldHeight == invalidHeight) $ do --TODO: This 'when' should probably be an assertion     when (new /= invalidHeight) $ do --TODO: This 'when' should probably be an assertion       writeIORef (switchSubscribedHeight subscribed) $! new-      WeakBag.traverse (switchSubscribedSubscribers subscribed) $ recalculateSubscriberHeight new+      WeakBag.traverse_ (switchSubscribedSubscribers subscribed) $ recalculateSubscriberHeight new  recalculateCoincidenceHeight :: CoincidenceSubscribed x a -> IO () recalculateCoincidenceHeight subscribed = do@@ -2259,7 +2266,7 @@     height <- calculateCoincidenceHeight subscribed     when (height /= invalidHeight) $ do       writeIORef (coincidenceSubscribedHeight subscribed) $! height-      WeakBag.traverse (coincidenceSubscribedSubscribers subscribed) $ recalculateSubscriberHeight height+      WeakBag.traverse_ (coincidenceSubscribedSubscribers subscribed) $ recalculateSubscriberHeight height  calculateSwitchHeight :: SwitchSubscribed x a -> IO Height calculateSwitchHeight subscribed = getEventSubscribedHeight . _eventSubscription_subscribed =<< readIORef (switchSubscribedCurrentParent subscribed)@@ -2699,3 +2706,11 @@ instance PrimMonad (SpiderHostFrame x) where   type PrimState (SpiderHostFrame x) = PrimState IO   primitive = SpiderHostFrame . EventM . primitive++instance NotReady (SpiderTimeline x) (SpiderHost x) where+  notReadyUntil _ = return ()+  notReady = return ()++instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where+  notReadyUntil _ = return ()+  notReady = return ()
src/Reflex/Workflow.hs view
@@ -34,7 +34,7 @@   rec eResult <- networkHold (unWorkflow w0) $ fmap unWorkflow $ switch $ snd <$> current eResult   return $ fmap fst eResult --- | Similar to 'workflow', but outputs an 'Event' that fires whenever the current 'Workflow' is replaced by the next 'Workflow'.+-- | Similar to 'workflow', but outputs an 'Event' that fires at post-build time and whenever the current 'Workflow' is replaced by the next 'Workflow'. workflowView :: 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) workflowView w0 = do   rec eResult <- networkView . fmap unWorkflow =<< holdDyn w0 eReplace
test/Reflex/Bench/Focused.hs view
@@ -134,7 +134,7 @@ holdDynChain = iterM (\d -> sample (current d) >>= flip holdDyn (updated d))  buildDynChain :: (Reflex t, MonadHold t m) => Word -> Dynamic t Word -> m (Dynamic t Word)-buildDynChain = iterM (\d -> do +buildDynChain = iterM (\d -> do     let b = fmap (+1) (current d)         e = fmap (*2) (updated d)     buildDynamic (sample b) e)
test/hlint.hs view
@@ -30,16 +30,9 @@         ]       matchFile = and <$> sequence         [ extension ==? ".hs"-        , let notElem' = liftOp notElem-          in filePath `notElem'` filePathExceptions pwd         ]   files <- find recurseInto matchFile (pwd </> "src") --TODO: Someday fix all hints in tests, etc.   ideas <- fmap concat $ forM files $ \f -> do     putStr $ "linting file " ++ drop (length pwd + 1) f ++ "... "     runHlint f   if null ideas then exitSuccess else exitFailure--filePathExceptions :: FilePath -> [FilePath]-filePathExceptions pwd = map (pwd </>) $-  [ "src/Data/AppendMap.hs" -- parse error when hlint runs-  ]