remove last use of TSet

This commit is contained in:
Joey Hess 2013-04-24 17:16:04 -04:00
parent e9441ffe8e
commit 7fa2d255da
4 changed files with 8 additions and 69 deletions

View file

@ -9,20 +9,15 @@ module Assistant.Commits where
import Assistant.Common
import Assistant.Types.Commits
import Utility.TSet
import Utility.TList
import Control.Concurrent.STM
{- Gets all unhandled commits.
- Blocks until at least one commit is made. -}
getCommits :: Assistant [Commit]
getCommits = (atomically . getTSet) <<~ commitChan
{- Puts unhandled commits back into the channel.
- Note: Original order is not preserved. -}
refillCommits :: [Commit] -> Assistant ()
refillCommits cs = (atomically . flip putTSet cs) <<~ commitChan
getCommits = (atomically . getTList) <<~ commitChan
{- Records a commit in the channel. -}
recordCommit :: Assistant ()
recordCommit = (atomically . flip putTSet1 Commit) <<~ commitChan
recordCommit = (atomically . flip consTList Commit) <<~ commitChan