on v0.0.4.0 help sign in
patch/.stylish-haskell.yaml
153 lines 5.5 kB history raw
1# stylish-haskell configuration file
2# ==================================
4# The stylish-haskell tool is mainly configured by specifying steps. These steps
5# are a list, so they have an order, and one specific step may appear more than
6# once (if needed). Each file is processed by these steps in the given order.
7steps:
8 # Convert some ASCII sequences to their Unicode equivalents. This is disabled
9 # by default.
10 # - unicode_syntax:
11 # # In order to make this work, we also need to insert the UnicodeSyntax
12 # # language pragma. If this flag is set to true, we insert it when it's
13 # # not already present. You may want to disable it if you configure
14 # # language extensions using some other method than pragmas. Default:
15 # # true.
16 # add_language_pragma: true
18 # Import cleanup
19 - imports:
20 # There are different ways we can align names and lists.
21 #
22 # - global: Align the import names and import list throughout the entire
23 # file.
24 #
25 # - file: Like global, but don't add padding when there are no qualified
26 # imports in the file.
27 #
28 # - group: Only align the imports per group (a group is formed by adjacent
29 # import lines).
30 #
31 # - none: Do not perform any alignment.
32 #
33 # Default: global.
34 align: none
36 # Folowing options affect only import list alignment.
37 #
38 # List align has following options:
39 #
40 # - after_alias: Import list is aligned with end of import including
41 # 'as' and 'hiding' keywords.
42 #
43 # > import qualified Data.List as List (concat, foldl, foldr, head,
44 # > init, last, length)
45 #
46 # - with_alias: Import list is aligned with start of alias or hiding.
47 #
48 # > import qualified Data.List as List (concat, foldl, foldr, head,
49 # > init, last, length)
50 #
51 # - new_line: Import list starts always on new line.
52 #
53 # > import qualified Data.List as List
54 # > (concat, foldl, foldr, head, init, last, length)
55 #
56 # Default: after alias
57 list_align: after_alias
59 # Long list align style takes effect when import is too long. This is
60 # determined by 'columns' setting.
61 #
62 # - inline: This option will put as much specs on same line as possible.
63 #
64 # - new_line: Import list will start on new line.
65 #
66 # - new_line_multiline: Import list will start on new line when it's
67 # short enough to fit to single line. Otherwise it'll be multiline.
68 #
69 # - multiline: One line per import list entry.
70 # Type with contructor list acts like single import.
71 #
72 # > import qualified Data.Map as M
73 # > ( empty
74 # > , singleton
75 # > , ...
76 # > , delete
77 # > )
78 #
79 # Default: inline
80 long_list_align: inline
82 # List padding determines indentation of import list on lines after import.
83 # This option affects 'list_align' and 'long_list_align'.
84 list_padding: 2
86 # Separate lists option affects formating of import list for type
87 # or class. The only difference is single space between type and list
88 # of constructors, selectors and class functions.
89 #
90 # - true: There is single space between Foldable type and list of it's
91 # functions.
92 #
93 # > import Data.Foldable (Foldable (fold, foldl, foldMap))
94 #
95 # - false: There is no space between Foldable type and list of it's
96 # functions.
97 #
98 # > import Data.Foldable (Foldable(fold, foldl, foldMap))
99 #
100 # Default: true
101 separate_lists: true
103 # Language pragmas
104 - language_pragmas:
105 # We can generate different styles of language pragma lists.
106 #
107 # - vertical: Vertical-spaced language pragmas, one per line.
108 #
109 # - compact: A more compact style.
110 #
111 # - compact_line: Similar to compact, but wrap each line with
112 # `{-#LANGUAGE #-}'.
113 #
114 # Default: vertical.
115 style: vertical
117 # Align affects alignment of closing pragma brackets.
118 #
119 # - true: Brackets are aligned in same collumn.
120 #
121 # - false: Brackets are not aligned together. There is only one space
122 # between actual import and closing bracket.
123 #
124 # Default: true
125 align: false
127 # stylish-haskell can detect redundancy of some language pragmas. If this
128 # is set to true, it will remove those redundant pragmas. Default: true.
129 remove_redundant: true
131 # Align the types in record declarations
132 # - records: {}
134 # Replace tabs by spaces. This is disabled by default.
135 # - tabs:
136 # # Number of spaces to use for each tab. Default: 8, as specified by the
137 # # Haskell report.
138 # spaces: 8
140 # Remove trailing whitespace
141 - trailing_whitespace: {}
143# A common setting is the number of columns (parts of) code will be wrapped
144# to. Different steps take this into account. Default: 80.
145columns: 110
147# Sometimes, language extensions are specified in a cabal file or from the
148# command line instead of using language pragmas in the file. stylish-haskell
149# needs to be aware of these, so it can parse the file correctly.
151# No language extensions are enabled by default.
152language_extensions:
153 - TemplateHaskell