add post-repair actions

This commit is contained in:
Joey Hess 2013-10-29 14:22:56 -04:00
parent 791c8535b5
commit 496c8b7abb
9 changed files with 113 additions and 71 deletions

View file

@ -1,4 +1,4 @@
{- git-annex assistant remote problem detection
{- git-annex assistant repository problem tracking
-
- Copyright 2013 Joey Hess <joey@kitenet.net>
-
@ -11,8 +11,18 @@ import Types
import Utility.TList
import Control.Concurrent.STM
import Data.Function
type RepoProblemChan = TList UUID
data RepoProblem = RepoProblem
{ problemUUID :: UUID
, afterFix :: IO ()
}
{- The afterFix actions are assumed to all be equivilant. -}
sameRepoProblem :: RepoProblem -> RepoProblem -> Bool
sameRepoProblem = (==) `on` problemUUID
type RepoProblemChan = TList RepoProblem
newRepoProblemChan :: IO RepoProblemChan
newRepoProblemChan = atomically newTList