coding stylegit-annexhttp://git-annex.branchable.com/coding_style/git-annexikiwiki2015-09-29T15:26:55ZWhat about safe?http://git-annex.branchable.com/coding_style/comment_1_70521cf79ad06832b1d73fc2c20c68ec/Yuval2014-07-06T10:45:59Z2014-07-06T10:45:59Z
<p>https://hackage.haskell.org/package/safe</p>
<blockquote><p>A library wrapping Prelude/Data.List functions that can throw exceptions, such as head and !!. Each unsafe function has up to four variants, e.g. with tail:</p>
<pre><code>tail :: [a] -> [a], raises an error on tail [].
tailMay :: [a] -> Maybe [a], turns errors into Nothing.
tailDef :: [a] -> [a] -> [a], takes a default to return on errors.
tailNote :: String -> [a] -> [a], takes an extra argument which supplements the error message.
tailSafe :: [a] -> [a], returns some sensible default if possible, [] in the case of tail.
</code></pre></blockquote>
comment 2http://git-annex.branchable.com/coding_style/comment_2_a820b7c8ae7c2290eb000f61bdb5c514/joeyh.name2014-07-10T20:24:03Z2014-07-10T20:24:03Z
safe does not prevent using the unsafe prelude functions. Utility.PartialPrelude does, and provides a few safe wrappers like lastMaybe.
Style for man pages?http://git-annex.branchable.com/coding_style/comment_3_61c178b997dd044f3531303913f8fa91/Don2015-09-28T10:00:45Z2015-09-28T10:00:45Z
<p>Could you add some suggestions for editing the .mdwn files? I'd like to help clean up a few (really minor) things I noticed, but I don't want to make more work for you with the changes I make. One thing I'm not sure about is where to set my fill column when editing--I can't seem to pick any single value (79? 80?) that doesn't make some paragraphs change when I rewrap them. Also, it might be helpful to have a quick guide for when you surround commands and other computer-y words with quotes, backticks, or nothing at all.</p>
man page stylehttp://git-annex.branchable.com/coding_style/comment_4_433b7ba5e51e746f6b033ebb5c0e50a2/joey2015-09-29T15:26:55Z2015-09-29T15:20:10Z
<p>Well, I don't always word-wrap paras when re-editing them, and several
people have had their hands on the man page and may have different wrapping
settings.</p>
<p>My suggestion would be, if you need to re-wrap, or generally make
whitespace changes, do it in a separate commit from other changes.
Similarly, make spelling corrections in a separate commit from any
substance changes.</p>
<p>Note that you can push man page commits directly to this site via git://
protocol, so it's not going to use my time as long as there's a reasonable
commit message.</p>
<p>Use backticks around any command name or fragment of a command line.
Use quotes around program output, or other values that are not command
names or switch names.</p>