on 1.3.0.0 help sign in
typeable/aeson/CONTRIBUTING.md
60 lines 1.3 kB history raw
1# Documenting changes
3Changes that affect users of aeson should be mentioned in `changelog.md`. It should contain
4* A description
5* The level of change, see [PVP](https://wiki.haskell.org/Package_versioning_policy)
6* Where applicable
7 * How to migrate existing code
8 * When it should be used
9 * What it supersedes
11Add this entry under an `## Upcoming` header above existing releases.
13The exact format of entries is not important as we'll go through everything before a release is made.
15# Style guide
17* 4 space indentation
19## Pragmas
21* One pragma on each line
22* No alignment
23* Sort lexicographically
25```haskell
26{-# LANGUAGE BangPatterns #-}
27{-# LANGUAGE CPP #-}
28{-# LANGUAGE DataKinds #-}
29```
31## Module declaration and exports
33* Opening paren on its own line
34* Prefix with commas
35* End with `) where`
37```haskell
38module Data.Aeson.Types.ToJSON
39 (
40 -- * Core JSON classes
41 ToJSON(..)
42 -- * Liftings to unary and binary type constructors
43 , ToJSON1(..)
44 , toJSON1
45 ) where
46```
48## Imports
50* No alignment of import lists or qualifications
51* Sort lexicographically (qualified imports will be last)
52* No space between types and constructor lists
53* Sort identifiers in import lists lexicographically
55```haskell
56import BarBar as B ((<>), foo)
57import Foo as F
58import Qux (Q(..), q)
59import qualified A
60```