on develop help sign in
Slightly reorder calls to readEventSubscribed to make their usage clearer
commit0357c06e2742e2fdd13cb1b2826dc74ce4ccb467 authorRyan Trinkle <ryan.trinkle@gmail.com> dateWed 3 Aug 2016, 15:06 (10 years ago) parent70ec8ca
1 file changed+2−2
src/Reflex/Spider/Internal.hs+2−2
src/Reflex/Spider/Internal.hs+2−2
@@ -711,8 +711,8 @@ getHoldEventSubscription h = do
711711 Left e -> do
712712 subscriptionRef <- liftIO $ newIORef $ error "getHoldEventSubscription: subdRef uninitialized"
713713 subscription@(EventSubscription _ subd) <- subscribe e =<< liftIO (newSubscriberHold h)
714− liftIO $ writeIORef subscriptionRef $! subscription
715714 occ <- liftIO $ readEventSubscribed subd
715+ liftIO $ writeIORef subscriptionRef $! subscription
716716 case occ of
717717 Nothing -> return ()
718718 Just o -> do
@@ -1613,8 +1613,8 @@ getSwitchSubscribed s sub = do
16131613 holdInits <- getDeferralQueue
16141614 e <- liftIO $ runBehaviorM (readBehaviorTracked (switchParent s)) (Just (wi, parentsRef)) holdInits
16151615 subscription@(EventSubscription _ subd) <- subscribe e mySub
1616− subscriptionRef <- liftIO $ newIORef subscription
16171616 parentOcc <- liftIO $ readEventSubscribed subd
1617+ subscriptionRef <- liftIO $ newIORef subscription
16181618 occRef <- liftIO $ newIORef parentOcc
16191619 when (isJust parentOcc) $ scheduleClear occRef
16201620 heightRef <- liftIO $ newIORef =<< getEventSubscribedHeight subd