summaryrefslogtreecommitdiff
path: root/Assistant/Changes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Changes.hs')
-rw-r--r--Assistant/Changes.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Assistant/Changes.hs b/Assistant/Changes.hs
index 60372f316..05f2795d3 100644
--- a/Assistant/Changes.hs
+++ b/Assistant/Changes.hs
@@ -28,17 +28,17 @@ pendingAddChange f = Just <$> (PendingAddChange <$> liftIO getCurrentTime <*> pu
{- Gets all unhandled changes.
- Blocks until at least one change is made. -}
getChanges :: Assistant [Change]
-getChanges = (atomically . getTSet) <<~ changeChan
+getChanges = fmap concat $ (atomically . getTSet) <<~ changeChan
{- Gets all unhandled changes, without blocking. -}
getAnyChanges :: Assistant [Change]
-getAnyChanges = (atomically . readTSet) <<~ changeChan
+getAnyChanges = fmap concat $ (atomically . readTSet) <<~ changeChan
{- Puts unhandled changes back into the channel.
- Note: Original order is not preserved. -}
refillChanges :: [Change] -> Assistant ()
-refillChanges cs = (atomically . flip putTSet cs) <<~ changeChan
+refillChanges cs = (atomically . flip putTSet1 cs) <<~ changeChan
{- Records a change in the channel. -}
recordChange :: Change -> Assistant ()
-recordChange c = (atomically . flip putTSet1 c) <<~ changeChan
+recordChange c = (atomically . flip putTSet1 [c]) <<~ changeChan