summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-13 19:06:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-13 19:06:26 -0400
commitc1c5ff5626edbd4474b327dc8b8e66bd218b3e5e (patch)
tree3eca00d56bac0fc4fb7674375ea56f039273d074 /Annex.hs
parent4727e1dc1de161ad9517bcb4c101c66ac632284f (diff)
clean up cleanup action enumeration
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Annex.hs b/Annex.hs
index 4e3efd0d0..820c1d569 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -60,6 +60,7 @@ import Types.FileMatcher
import Types.NumCopies
import Types.LockPool
import Types.MetaData
+import Types.CleanupActions
import qualified Utility.Matcher
import qualified Data.Map as M
import qualified Data.Set as S
@@ -114,7 +115,7 @@ data AnnexState = AnnexState
, flags :: M.Map String Bool
, fields :: M.Map String String
, modmeta :: [ModMeta]
- , cleanup :: M.Map String (Annex ())
+ , cleanup :: M.Map CleanupAction (Annex ())
, inodeschanged :: Maybe Bool
, useragent :: Maybe String
, errcounter :: Integer
@@ -210,9 +211,9 @@ setField field value = changeState $ \s ->
s { fields = M.insertWith' const field value $ fields s }
{- Adds a cleanup action to perform. -}
-addCleanup :: String -> Annex () -> Annex ()
-addCleanup uid a = changeState $ \s ->
- s { cleanup = M.insertWith' const uid a $ cleanup s }
+addCleanup :: CleanupAction -> Annex () -> Annex ()
+addCleanup k a = changeState $ \s ->
+ s { cleanup = M.insertWith' const k a $ cleanup s }
{- Sets the type of output to emit. -}
setOutput :: OutputType -> Annex ()