From 76102c1c7541e7b10c3a3fbe242e9856fef955b3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 27 Apr 2012 13:23:52 -0400 Subject: 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. --- Types/Messages.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Types/Messages.hs (limited to 'Types') 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 + - + - 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 -- cgit v1.2.3