on develop help sign in
Merge branch 'master' into develop
commit09f6f39c644be3b44318d7d1fb2e63688ffcd6b2 authorAli Abrar <aliabrar@gmail.com> dateTue 14 Apr 2015, 02:15 (12 years ago) parent368417c2653f40
2 files changed+6−1
reflex.cabal+1−1 src/Reflex/Spider/Internal.hs+5
reflex.cabal+1−1
@@ -1,5 +1,5 @@
11Name: reflex
2−Version: 0.1.0
2+Version: 0.1.1
33Synopsis: Higher-order Functional Reactive Programming
44Description: Reflex is a high-performance, deterministic, higher-order Functional Reactive Programming system
55License: BSD3
src/Reflex/Spider/Internal.hs+5
@@ -818,6 +818,10 @@ subscribe e ws = do
818818 liftIO $ subscribeEventSubscribed subd ws
819819 return subd
820820
821+noinlineFalse :: Bool
822+noinlineFalse = False
823+{-# NOINLINE noinlineFalse #-}
824+
821825getRootSubscribed :: Root a -> EventM (RootSubscribed a)
822826getRootSubscribed r = do
823827 mSubscribed <- liftIO $ readIORef $ rootSubscribed r
@@ -829,6 +833,7 @@ getRootSubscribed r = do
829833 -- 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
830834 uninit <- rootInit r $ RootTrigger (subscribersRef, rootOccurrence r)
831835 addFinalizer subscribed $ do
836+ when noinlineFalse $ putStr "" -- For some reason, without this line, the finalizer will run earlier than it should
832837-- putStrLn "Uninit root"
833838 uninit
834839 liftIO $ writeIORef (rootSubscribed r) $ Just subscribed