haskell-style-guide
haskell-style-guide copied to clipboard
A style guide for Haskell code.
This is more of an issue with the developer community slipping on their ethical standards. Search for "Constructor fields should be strict, unless there's an explicit reason to make them...
The guide doesn't say anything about naming of function arguments, local variables, or field names of record types. Is that on purpose or should there be some recommendation?
Wouldn't it be better to have the style guide on the Github project page? In other words, rename `haskell-style.md` to `README.md`.
Should the space between record constructor or updated expression and record field list exist? ``` haskell data Rec type1 = Rec{field1 :: type1, field2 :: Type2} f x@Rec{field1} = x{field2...
Is there a tool similar to http://hackage.haskell.org/package/scan which can check that these guidelines are being followed?
For export lists, you recommend indenting commented "section" lines two spaces further than the opening and closing braces and commas: > Format export lists as follows: > > ``` haskell...
The style guide has recommendations for `where` bindings. What about `let`-`in` clauses? In my opinion, the recommendation for `if`-`then`-`else` clauses, > Short cases should usually be put on a single...
The general recommendation seems to be to place pragmas after the entity they apply to. But in case of the `{-# MINIMAL #-}` pragma, I think the following works best...
How shall a function with long list of arguments be broken? What of the following is acceptable (n.b. the max line length was shortened artificially for illustration)? where shall the...