@@ -332,18 +332,18 @@ react
332 -> IO response
332 -> IO response
333 -> AsyncT m eventdata
333 -> AsyncT m eventdata
334react setHandler iob = AsyncT $ do
334react setHandler iob = AsyncT $ do
335− cont <- get
335+ context <- get
336− case event cont of
336+ case event context of
337 Nothing -> do
337 Nothing -> do
338 lift $ setHandler $ \dat ->do
338 lift $ setHandler $ \dat ->do
339− runStateT (resume cont) cont{event= Just $ unsafeCoerce dat}
339+ resume (updateContextEvent context dat)
340 liftIO iob
340 liftIO iob
341 loc <- getLocation
341 loc <- getLocation
342 when (loc /= RemoteNode) $ setLocation WaitingParent
342 when (loc /= RemoteNode) $ setLocation WaitingParent
343 return Nothing
343 return Nothing
345 j@(Just _) -> do
345 j@(Just _) -> do
346− put cont{event=Nothing}
346+ put context{event=Nothing}
347 return $ unsafeCoerce j
347 return $ unsafeCoerce j
349------------------------------------------------------------------------------
349------------------------------------------------------------------------------