[darcs-devel] [patch752] Minor formatting of Darcs.Commands.Dist (and 1 more)

Will Langstroth will at langstroth.com
Mon Mar 12 14:06:23 UTC 2012


>
> Thanks for another cleanup patch!
>

You're welcome!


>
> > hunk ./src/Darcs/Commands/Dist.hs 125
> > -distCmd :: [DarcsFlag] -> [String] -> IO ()
> >
>
> +--------------------------------------------------------------------------------
> > +distCmd :: [DarcsFlag]
> > +        -> [String]
> > +        -> IO ()
>
> I'm not sure about two parts of these patches:
>
> the "-----" lines seem unecessary to me and are the sort of thing that'll
> be
> added once in these clean-up patches but then never by anyone adding new
> functions. I would leave them out, personally. What purpose do they serve?
>

To demarcate 80 characters, and separate the functions until it's more
obvious. They can absolutely be left out, I was just having a hard time
navigating some of the absolutely huge functions that are in darcs. It's a
convention used by the Snap project. They're not important, though, and if
they're distracting, that's no good.


> Secondly, I think the wrapping of the type-signature is only necessary if
> the
> length is too great, or if you wish to add end-of-line comments to
> individual
> parameter types. Otherwise we're increasing the number of lines for no real
> benefit (that I can see).
>

The only reason I put them there is precisely the reason you give: to make
it easier to put Haddock comments on the parameters. If you check out
Tibbel's guide, under Comments, Top Level Definitions, that's my goal. Once
I have the format laid out, I'd like to provide comments to the parameters.
I feel like I should know the code better first, though.



> The reason I'm mentioning these is that I've been slightly pushing recently
> for
> Darcs to adopt Tibbe's style guide[1], which I find to be a nice "go to"
> for
> style questions - it's not really officially agreed on though. But it'd
> make
> sense if our clean up patches are following the same guidelines!
>

That's the style guide I'm using, so as long as you're accepting my
patches, we'll be there in no time!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20120312/3aba9821/attachment.html>


More information about the darcs-devel mailing list