summaryrefslogtreecommitdiff
path: root/Assistant/Types
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Types')
-rw-r--r--Assistant/Types/Changes.hs3
-rw-r--r--Assistant/Types/Commits.hs4
2 files changed, 5 insertions, 2 deletions
diff --git a/Assistant/Types/Changes.hs b/Assistant/Types/Changes.hs
index d4e1b28bc..ee797b8fe 100644
--- a/Assistant/Types/Changes.hs
+++ b/Assistant/Types/Changes.hs
@@ -12,6 +12,7 @@ import Types.Key
import Utility.TSet
import Data.Time.Clock
+import Control.Concurrent.STM
data ChangeInfo = AddChange Key | LinkChange (Maybe Key) | RmChange | RmDirChange
deriving (Show, Eq)
@@ -40,7 +41,7 @@ data Change
deriving (Show)
newChangeChan :: IO ChangeChan
-newChangeChan = newTSet
+newChangeChan = atomically newTSet
isPendingAddChange :: Change -> Bool
isPendingAddChange (PendingAddChange {}) = True
diff --git a/Assistant/Types/Commits.hs b/Assistant/Types/Commits.hs
index bb17c578b..12dab8da8 100644
--- a/Assistant/Types/Commits.hs
+++ b/Assistant/Types/Commits.hs
@@ -9,9 +9,11 @@ module Assistant.Types.Commits where
import Utility.TSet
+import Control.Concurrent.STM
+
type CommitChan = TSet Commit
data Commit = Commit
newCommitChan :: IO CommitChan
-newCommitChan = newTSet
+newCommitChan = atomically newTSet