aboutsummaryrefslogtreecommitdiff
path: root/Types/Messages.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-27 13:23:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-27 13:54:33 -0400
commit76102c1c7541e7b10c3a3fbe242e9856fef955b3 (patch)
treee9c0b61fd1913c59c68dfa9929a860fc61d767bf /Types/Messages.hs
parente0b7012ccc405dedb556b8c940eb66e42304bc73 (diff)
display "Recording state in git..." when staging the journal
A bit tricky to avoid printing it twice in a row when there are queued git commands to run and journal to stage. Added a generic way to run an action that may output multiple side messages, with only the first displayed.
Diffstat (limited to 'Types/Messages.hs')
-rw-r--r--Types/Messages.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Types/Messages.hs b/Types/Messages.hs
new file mode 100644
index 000000000..75653d574
--- /dev/null
+++ b/Types/Messages.hs
@@ -0,0 +1,20 @@
+{- git-annex Messages data types
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Types.Messages where
+
+data OutputType = NormalOutput | QuietOutput | JSONOutput
+
+data SideActionBlock = NoBlock | StartBlock | InBlock
+
+data MessageState = MessageState
+ { outputType :: OutputType
+ , sideActionBlock :: SideActionBlock
+ }
+
+defaultMessageState :: MessageState
+defaultMessageState = MessageState NormalOutput NoBlock