Improve usage pretty-printing: children in separate line

pull/5/head
Lennart Spitzner 2017-08-10 18:03:07 +02:00
parent 9433991ae6
commit 12a2bed6c8
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ import UI.Butcher.Monadic.Internal.Core
-- > playground [--short] NAME [version | help] -- > playground [--short] NAME [version | help]
ppUsage :: CommandDesc a -> PP.Doc ppUsage :: CommandDesc a -> PP.Doc
ppUsage (CommandDesc mParent _help _syn parts out children) = pparents mParent ppUsage (CommandDesc mParent _help _syn parts out children) = pparents mParent
<+> PP.fsep (partDocs ++ [subsDoc]) <+> PP.sep [PP.fsep partDocs, subsDoc]
where where
pparents :: Maybe (String, CommandDesc out) -> PP.Doc pparents :: Maybe (String, CommandDesc out) -> PP.Doc
pparents Nothing = PP.empty pparents Nothing = PP.empty