Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Latest commit

 

History

History
12 lines (9 loc) · 716 Bytes

style-guide.md

File metadata and controls

12 lines (9 loc) · 716 Bytes

Haskell Style Guide

There are really only 5 things you need to know:

  1. Use 4 spaces.
  2. Use stylish-haskell for imports.
  3. Use spaces around all operators in all cases (exception: (%) from Formatting).
  4. As a default, use ! to make all fields in data types strict. If strictness annotations are omitted, document why.
  5. As a default, make functions lazy. If they must be strict, document why.
  6. All imports should be either qualified or explicit, i.e. with enumeration of stuff that you're importing (exception: Universum).

The rest of the style guide can be found here.