darcs

Patch 1541 refactor: help and usage formatting cleanup (and 2 more)

Title refactor: help and usage formatting cleanup (and 2 more)
Superseder Nosy List bf
Related Issues
Status accepted Assigned To
Milestone

Created on 2017-03-22.22:31:44 by bf, last changed 2017-04-06.15:56:22 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt bf, 2017-03-22.22:31:43 text/x-darcs-patch
refactor_-help-and-usage-formatting-cleanup.dpatch bf, 2017-03-22.22:31:43 application/x-darcs-patch
unnamed bf, 2017-03-22.22:31:43 text/plain
See mailing list archives for discussion on individual patches.
Messages
msg19386 (view) Author: bf Date: 2017-03-22.22:31:43
These cleanups should be semantically transparent.

3 patches for repository http://darcs.net/screened:

patch 7d0d7c20b8d51c0492d82d25c18448e4dc9fad9a
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date:   Wed Mar 22 11:50:17 CET 2017
  * refactor: help and usage formatting cleanup
  
  The main change here is to use Doc for formatting since it has all the
  features we need and was designed for just that kind of task. This needs the
  recent fix in vsep to avoid too many empty lines in the output.

patch 44f19e982401dbe830d5ac029b090673df61666b
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date:   Wed Mar 22 19:35:00 CET 2017
  * refactor: moved printDryRunMessageAndExit from Darcs.UI.Commands to Darcs.UI.Commands.Util

patch e9d0c008fae6099332e5d29910984d86ac5e40ea
Author: Ben Franksen <benjamin.franksen@helmholtz-berlin.de>
Date:   Wed Mar 22 19:35:59 CET 2017
  * refactor: move usage and help related functions from Darcs.UI.Commands to Darcs.UI.Usage
Attachments
msg19423 (view) Author: ganesh Date: 2017-04-05.04:00:28
>  * refactor: help and usage formatting cleanup

This looks like a really good idea - still reading through it/looking 
at the output.

One minor initial nitpick:

> hunk ./src/Darcs/UI/Commands.hs 220
> -usage :: [CommandControl] -> String
> -usage cs = unlines
> +usage :: [CommandControl] -> Doc
> +usage cs = vsep $

Annoying whitespace at the end of the last line :-) (the pasted '$' is 
not Haskell, but the red darcs marker)
msg19428 (view) Author: ganesh Date: 2017-04-06.03:59:56
>  * refactor: help and usage formatting cleanup

looks fine, I haven't checked every single change

>  * refactor: moved printDryRunMessageAndExit from Darcs.UI.Commands 
to Darcs.UI.Commands.Util

>  * refactor: move usage and help related functions from 
Darcs.UI.Commands to Darcs.UI.Usage

These both look fine.
History
Date User Action Args
2017-03-22 22:31:44bfcreate
2017-03-22 22:32:17bfsetstatus: needs-screening -> needs-review
2017-04-05 04:00:30ganeshsetmessages: + msg19423
2017-04-06 03:59:57ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg19428
2017-04-06 15:56:22ganeshsetstatus: accepted-pending-tests -> accepted