module Cmd.SaveGitT where
import qualified Util.GitT as GitT
import qualified Util.Pretty as Pretty
import qualified Ui.Ui as Ui
import qualified Ui.Update as Update
import Global
data SaveHistory =
SaveHistory !Ui.State !(Maybe GitT.Commit) [Update.UiUpdate] ![Text]
deriving (Int -> SaveHistory -> ShowS
[SaveHistory] -> ShowS
SaveHistory -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SaveHistory] -> ShowS
$cshowList :: [SaveHistory] -> ShowS
show :: SaveHistory -> String
$cshow :: SaveHistory -> String
showsPrec :: Int -> SaveHistory -> ShowS
$cshowsPrec :: Int -> SaveHistory -> ShowS
Show)
instance Pretty SaveHistory where
format :: SaveHistory -> Doc
format (SaveHistory State
_state Maybe Commit
commit [UiUpdate]
updates [Text]
cmds) =
Doc -> [(Text, Doc)] -> Doc
Pretty.record Doc
"SaveHistory"
[ (Text
"commit", forall a. Pretty a => a -> Doc
Pretty.format Maybe Commit
commit)
, (Text
"updates", forall a. Pretty a => a -> Doc
Pretty.format [UiUpdate]
updates)
, (Text
"cmds", forall a. Pretty a => a -> Doc
Pretty.format [Text]
cmds)
]
data User = User { User -> Text
name :: !Text, User -> Text
email :: !Text } deriving (Int -> User -> ShowS
[User] -> ShowS
User -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [User] -> ShowS
$cshowList :: [User] -> ShowS
show :: User -> String
$cshow :: User -> String
showsPrec :: Int -> User -> ShowS
$cshowsPrec :: Int -> User -> ShowS
Show)