@@ -1090,13 +1090,23 @@ runBehaviorM :: BehaviorM a -> Maybe (Weak Invalidator, IORef [SomeBehaviorSubsc
10901090runBehaviorM a mwi holdInits = runReaderT (unBehaviorM a) (mwi, holdInits)
10911091
10921092askInvalidator :: BehaviorM (Maybe (Weak Invalidator))
1093−askInvalidator = fmap fst . fst <$> BehaviorM ask
1093+askInvalidator = do
1094+ (!m, _) <- BehaviorM ask
1095+ case m of
1096+ Nothing -> return Nothing
1097+ Just (!wi, _) -> return $ Just wi
10941098
10951099askParentsRef :: BehaviorM (Maybe (IORef [SomeBehaviorSubscribed]))
1096−askParentsRef = fmap snd . fst <$> BehaviorM ask
1100+askParentsRef = do
1101+ (!m, _) <- BehaviorM ask
1102+ case m of
1103+ Nothing -> return Nothing
1104+ Just (_, !p) -> return $ Just p
10971105
10981106askBehaviorHoldInits :: BehaviorM (IORef [SomeHoldInit])
1099−askBehaviorHoldInits = snd <$> BehaviorM ask
1107+askBehaviorHoldInits = do
1108+ (_, !his) <- BehaviorM ask
1109+ return his
11001110
11011111readBehaviorTracked :: Behavior a -> BehaviorM a
11021112readBehaviorTracked b = case b of