reflex 0.1.0 → 0.1.1
raw patch · 2 files changed
+7/−2 lines, 2 files
Files
- reflex.cabal +1/−1
- src/Reflex/Spider/Internal.hs +6/−1
reflex.cabal view
@@ -1,5 +1,5 @@ Name: reflex-Version: 0.1.0+Version: 0.1.1 Synopsis: Higher-order Functional Reactive Programming Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system License: BSD3
src/Reflex/Spider/Internal.hs view
@@ -382,7 +382,7 @@ EventCoincidence _ -> "EventCoincidence" data EventSubscribed a- = EventSubscribedRoot !(RootSubscribed a)+ = EventSubscribedRoot {-# NOUNPACK #-} (RootSubscribed a) | EventSubscribedNever | forall b. EventSubscribedPush !(PushSubscribed b a) | forall k. (GCompare k, a ~ DMap k) => EventSubscribedMerge !(MergeSubscribed k)@@ -765,6 +765,10 @@ liftIO $ subscribeEventSubscribed subd ws return subd +noinlineFalse :: Bool+noinlineFalse = False+{-# NOINLINE noinlineFalse #-}+ getRootSubscribed :: Root a -> EventM (RootSubscribed a) getRootSubscribed r = do mSubscribed <- liftIO $ readIORef $ rootSubscribed r@@ -779,6 +783,7 @@ -- Strangely, init needs the same stuff as a RootSubscribed has, but it must not be the same as the one that everyone's subscribing to, or it'll leak memory uninit <- rootInit r $ RootTrigger (subscribersRef, rootOccurrence r) addFinalizer subscribed $ do+ when noinlineFalse $ putStr "" -- For some reason, without this line, the finalizer will run earlier than it should -- putStrLn "Uninit root" uninit liftIO $ writeIORef (rootSubscribed r) $ Just subscribed