<br><br><div class="gmail_quote">On Tue, Mar 19, 2013 at 7:29 AM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com" target="_blank">johan.tibell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Mar 19, 2013 at 6:35 AM, Duncan Coutts <span dir="ltr"><<a href="mailto:duncan.coutts@googlemail.com" target="_blank">duncan.coutts@googlemail.com</a>></span> wrote:<br></div><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Go for it!</div>
<br>
You'll also notice that the code uses different styles in different<br>
places (because of different authors). We've not gone through and tidied<br>
stuff up because we're lazy and because there never seems to be a good<br>
time to do it (it causes conflicts with patches people are working on).<br></blockquote><div><br></div></div><div>If you need to write a style guide, why not use</div><div><br></div><div><a href="https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md" target="_blank">https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md</a></div>
<div><br></div><div>as a starting point. It's widely used in the Haskell community nowadays (e.g. it's a common recommendation on IRC) and it's based on the coding style of Duncan, Bryan, and Don for the most part.</div>
</div></blockquote><div><br></div><div>There are a few recommendations in that guide that I'm not a fan of. Below are the main ones.</div><div><br></div><div>This looks wrong to me:</div><div><a href="https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md#export-lists">https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md#export-lists</a></div>
<div><br></div><div>Partly because my default indent distance is 2 spaces, but also because I prefer the export list to be left aligned:</div><div><div>module Data.Set</div><div>(</div><div> -- * The @Set@ type</div><div>
Set</div><div>, empty</div><div>, singleton</div><div><br></div><div> -- * Querying</div><div>, member</div><div>) where</div></div><div><br></div><div>I suspect that style is more common in the community overall.</div>
<div><br></div><div>I'm not convinced that data types should have strict constructors by default. I agree it's the right thing in many cases, but I don't know how I feel about "strict by default" as a recommendation for beginners. It sounds like we're encouraging a cargo cult to me. I think it's better to educate people.</div>
<div><br></div><div>Jason</div></div>