@@ -0,0 +1,224 @@
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.
8+ # Convert some ASCII sequences to their Unicode equivalents. This is disabled
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:
16+ # add_language_pragma: true
18+ # Align the right hand side of some elements. This is quite conservative
19+ # and only applies to statements where each element occupies a single
23+ top_level_patterns: true
28+ # There are different ways we can align names and lists.
30+ # - global: Align the import names and import list throughout the entire
33+ # - file: Like global, but don't add padding when there are no qualified
34+ # imports in the file.
36+ # - group: Only align the imports per group (a group is formed by adjacent
39+ # - none: Do not perform any alignment.
44+ # The following options affect only import list alignment.
46+ # List align has following options:
48+ # - after_alias: Import list is aligned with end of import including
49+ # 'as' and 'hiding' keywords.
51+ # > import qualified Data.List as List (concat, foldl, foldr, head,
52+ # > init, last, length)
54+ # - with_alias: Import list is aligned with start of alias or hiding.
56+ # > import qualified Data.List as List (concat, foldl, foldr, head,
57+ # > init, last, length)
59+ # - new_line: Import list starts always on new line.
61+ # > import qualified Data.List as List
62+ # > (concat, foldl, foldr, head, init, last, length)
64+ # Default: after_alias
65+ list_align: with_alias
67+ # Right-pad the module names to align imports in a group:
69+ # - true: a little more readable
71+ # > import qualified Data.List as List (concat, foldl, foldr,
72+ # > init, last, length)
73+ # > import qualified Data.List.Extra as List (concat, foldl, foldr,
74+ # > init, last, length)
78+ # > import qualified Data.List as List (concat, foldl, foldr, init,
80+ # > import qualified Data.List.Extra as List (concat, foldl, foldr,
81+ # > init, last, length)
84+ pad_module_names: true
86+ # Long list align style takes effect when import is too long. This is
87+ # determined by 'columns' setting.
89+ # - inline: This option will put as much specs on same line as possible.
91+ # - new_line: Import list will start on new line.
93+ # - new_line_multiline: Import list will start on new line when it's
94+ # short enough to fit to single line. Otherwise it'll be multiline.
96+ # - multiline: One line per import list entry.
97+ # Type with constructor list acts like single import.
99+ # > import qualified Data.Map as M
107+ long_list_align: multiline
109+ # Align empty list (importing instances)
111+ # Empty list align has following options
113+ # - inherit: inherit list_align setting
115+ # - right_after: () is right after the module name:
117+ # > import Vector.Instances ()
120+ empty_list_align: inherit
122+ # List padding determines indentation of import list on lines after import.
123+ # This option affects 'long_list_align'.
125+ # - <integer>: constant value
127+ # - module_name: align under start of module name.
128+ # Useful for 'file' and 'group' align settings.
131+ # Separate lists option affects formatting of import list for type
132+ # or class. The only difference is single space between type and list
133+ # of constructors, selectors and class functions.
135+ # - true: There is single space between Foldable type and list of it's
138+ # > import Data.Foldable (Foldable (fold, foldl, foldMap))
140+ # - false: There is no space between Foldable type and list of it's
143+ # > import Data.Foldable (Foldable(fold, foldl, foldMap))
146+ separate_lists: false
148+ # Space surround option affects formatting of import lists on a single
149+ # line. The only difference is single space after the initial
150+ # parenthesis and a single space before the terminal parenthesis.
152+ # - true: There is single space associated with the enclosing
155+ # > import Data.Foo ( foo )
157+ # - false: There is no space associated with the enclosing parenthesis
159+ # > import Data.Foo (foo)
162+ space_surround: false
166+ # We can generate different styles of language pragma lists.
168+ # - vertical: Vertical-spaced language pragmas, one per line.
170+ # - compact: A more compact style.
172+ # - compact_line: Similar to compact, but wrap each line with
173+ # `{-#LANGUAGE #-}'.
175+ # Default: vertical.
178+ # Align affects alignment of closing pragma brackets.
180+ # - true: Brackets are aligned in same column.
182+ # - false: Brackets are not aligned together. There is only one space
183+ # between actual import and closing bracket.
188+ # stylish-haskell can detect redundancy of some language pragmas. If this
189+ # is set to true, it will remove those redundant pragmas. Default: true.
190+ remove_redundant: true
192+ # Replace tabs by spaces. This is disabled by default.
194+ # # Number of spaces to use for each tab. Default: 8, as specified by the
198+ # Remove trailing whitespace
199+ - trailing_whitespace: {}
201+# A common setting is the number of columns (parts of) code will be wrapped
202+# to. Different steps take this into account. Default: 80.
205+# By default, line endings are converted according to the OS. You can override
206+# preferred format here.
208+# - native: Native newline format. CRLF on Windows, LF on other OSes.
210+# - lf: Convert to LF ("\n").
212+# - crlf: Convert to CRLF ("\r\n").
217+# Sometimes, language extensions are specified in a cabal file or from the
218+# command line instead of using language pragmas in the file. stylish-haskell
219+# needs to be aware of these, so it can parse the file correctly.
221+# No language extensions are enabled by default.
222+# language_extensions: