@@ -1482,12 +1482,12 @@ getMergeSubscribed m sub = do
14821482 subscribedRef <- liftIO $ newIORef $ error "getMergeSubscribed: subscribedRef not yet initialized"
14831483 subscribedUnsafe <- liftIO $ unsafeInterleaveIO $ readIORef subscribedRef
14841484 initialParents <- readBehaviorUntracked $ current $ mergeParents m
1485− subscribers :: [(Maybe (DSum k Identity), Height, DSum k (MergeSubscribedParent x k))] <- forM (DMap.toList initialParents) $ {-# SCC "getMergeSubscribed.a" #-} \(k :=> e) -> do
1486− s <- {-# SCC "getMergeSubscribed.a.1" #-} liftIO $ newSubscriberMerge k subscribedUnsafe
1487− subscription@(EventSubscription _ parentSubd) <- {-# SCC "getMergeSubscribed.a.2" #-} subscribe e s
1488− parentOcc <- {-# SCC "getMergeSubscribed.a.3" #-} liftIO $ readEventSubscribed parentSubd
1489− height <- {-# SCC "getMergeSubscribed.a.4" #-} liftIO $ getEventSubscribedHeight parentSubd
1490− {-# SCC "getMergeSubscribed.a.5" #-} return $ (fmap (\x -> k :=> Identity x) parentOcc, height, k :=> MergeSubscribedParent subscription s)
1485+ subscribers :: [(Maybe (DSum k Identity), Height, DSum k (MergeSubscribedParent x k))] <- forM (DMap.toList initialParents) $ \(k :=> e) -> do
1486+ s <- liftIO $ newSubscriberMerge k subscribedUnsafe
1487+ subscription@(EventSubscription _ parentSubd) <- subscribe e s
1488+ parentOcc <- liftIO $ readEventSubscribed parentSubd
1489+ height <- liftIO $ getEventSubscribedHeight parentSubd
1490+ return $ (fmap (\x -> k :=> Identity x) parentOcc, height, k :=> MergeSubscribedParent subscription s)
14911491 let dm = DMap.fromDistinctAscList $ mapMaybe (\(x, _, _) -> x) subscribers
14921492 heights = fmap (\(_, h, _) -> h) subscribers --TODO: Assert that there's no invalidHeight in here
14931493 myHeightBag = heightBagFromList $ filter (/= invalidHeight) heights