on 1.0.0.0 help sign in
typeable/aeson/CONTRIBUTING.md
46 lines 841 B history raw
1# Style guide
3* 4 space indentation
5## Pragmas
7* One pragma on each line
8* No alignment
9* Sort lexicographically
11```haskell
12{-# LANGUAGE BangPatterns #-}
13{-# LANGUAGE CPP #-}
14{-# LANGUAGE DataKinds #-}
15```
17## Module declaration and exports
19* Opening paren on its own line
20* Prefix with commas
21* End with `) where`
23```haskell
24module Data.Aeson.Types.ToJSON
25 (
26 -- * Core JSON classes
27 ToJSON(..)
28 -- * Liftings to unary and binary type constructors
29 , ToJSON1(..)
30 , toJSON1
31 ) where
32```
34## Imports
36* No alignment of import lists or qualifications
37* Sort lexicographically (qualified imports will be last)
38* No space between types and constructor lists
39* Sort identifiers in import lists lexicographically
41```haskell
42import BarBar as B ((<>), foo)
43import Foo as F
44import Qux (Q(..), q)
45import qualified A
46```