summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-30 13:59:05 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-30 13:59:05 -0400
commitbf70bbdbfc875836cf880ba8a03cac74948a30a3 (patch)
tree1f422e9cbf29e3541787abb9522f9ecd561f65ce /Annex.hs
parent0c9c14b52fcdd9684da70c8dd763661acdbd3843 (diff)
fix test suite build
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Annex.hs b/Annex.hs
index f2fb1f401..d1509d4bd 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -18,6 +18,7 @@ module Annex (
changeState,
setFlag,
setField,
+ setOutput,
getFlag,
getField,
addCleanup,
@@ -148,6 +149,11 @@ addCleanup :: String -> Annex () -> Annex ()
addCleanup uid a = changeState $ \s ->
s { cleanup = M.insertWith' const uid a $ cleanup s }
+{- Sets the type of output to emit. -}
+setOutput :: OutputType -> Annex ()
+setOutput o = changeState $ \s ->
+ s { output = (output s) { outputType = o } }
+
{- Checks if a flag was set. -}
getFlag :: String -> Annex Bool
getFlag flag = fromMaybe False . M.lookup flag <$> getState flags