@@ -22,7 +22,6 @@ import Data.Maybe
2222import Data.IntMap (IntMap)
2323import qualified Data.IntMap as IntMap
2424import Control.Lens hiding (coerce)
25−import Control.Monad.TypedId
2625import Control.Monad.Ref
2726import Data.Monoid ((<>))
2827
@@ -452,6 +451,7 @@ newRoot = do
452451 , rootInit = const $ return $ return ()
453452 }
454453
454+propagateAndUpdateSubscribersRef :: IORef [WeakSubscriber a] -> a -> EventM ()
455455propagateAndUpdateSubscribersRef subscribersRef a = do
456456 subscribers <- liftIO $ readIORef subscribersRef
457457 liftIO $ writeIORef subscribersRef []
@@ -1278,13 +1278,6 @@ instance R.MonadReadEvent Spider ResultM where
12781278 {-# INLINE readEvent #-}
12791279 readEvent = liftM (fmap return) . readEvent . unSpiderEvent
12801280
1281−--TODO: Can probably get rid of this now that we're not using it for performEvent
1282−instance MonadTypedId EventM where
1283− type TypedId EventM = TypedId IO
1284− {-# INLINE getTypedId #-}
1285− getTypedId = do
1286− liftIO getTypedId
1287−
12881281instance MonadRef EventM where
12891282 type Ref EventM = Ref IO
12901283 {-# INLINE newRef #-}
@@ -1307,7 +1300,8 @@ instance R.MonadHold Spider SpiderHostFrame where
13071300 {-# INLINE hold #-}
13081301 hold v0 e = SpiderHostFrame $ R.hold v0 e
13091302
1310−newEventWithTriggerIO f= do
1303+newEventWithTriggerIO :: (RootTrigger a -> IO (IO ())) -> IO (R.Event Spider a)
1304+newEventWithTriggerIO f = do
13111305 occRef <- newIORef Nothing
13121306 subscribedRef <- newIORef Nothing
13131307 let !r = Root