|
|
|
@ -1,59 +1,126 @@
@@ -1,59 +1,126 @@
|
|
|
|
|
--- |
|
|
|
|
# stylish-haskell configuration file |
|
|
|
|
# ================================== |
|
|
|
|
steps: |
|
|
|
|
- records: |
|
|
|
|
# How to format equals sign between type constructor and data constructor. |
|
|
|
|
# Possible values: |
|
|
|
|
# - "same_line" -- leave "=" AND data constructor on the same line as the type constructor. |
|
|
|
|
# - "indent N" -- insert a new line and N spaces from the beginning of the next line. |
|
|
|
|
equals: "same_line" |
|
|
|
|
|
|
|
|
|
newline: native |
|
|
|
|
cabal: true |
|
|
|
|
columns: 120 |
|
|
|
|
# How to format first field of each record constructor. |
|
|
|
|
# Possible values: |
|
|
|
|
# - "same_line" -- "{" and first field goes on the same line as the data constructor. |
|
|
|
|
# - "indent N" -- insert a new line and N spaces from the beginning of the data constructor |
|
|
|
|
first_field: "same_line" |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
# How many spaces to insert between the column with "," and the beginning of the comment in the next line. |
|
|
|
|
field_comment: 2 |
|
|
|
|
|
|
|
|
|
# How many spaces to insert before "deriving" clause. Deriving clauses are always on separate lines. |
|
|
|
|
deriving: 8 |
|
|
|
|
|
|
|
|
|
# How many spaces to insert before "via" clause counted from indentation of deriving clause |
|
|
|
|
# Possible values: |
|
|
|
|
# - "same_line" -- "via" part goes on the same line as "deriving" keyword. |
|
|
|
|
# - "indent N" -- insert a new line and N spaces from the beginning of "deriving" keyword. |
|
|
|
|
via: "same_line" |
|
|
|
|
|
|
|
|
|
# Sort typeclass names in the "deriving" list alphabetically. |
|
|
|
|
sort_deriving: true |
|
|
|
|
|
|
|
|
|
# Wheter or not to break enums onto several lines |
|
|
|
|
# |
|
|
|
|
# Default: false |
|
|
|
|
break_enums: false |
|
|
|
|
|
|
|
|
|
# Whether or not to break single constructor data types before `=` sign |
|
|
|
|
# |
|
|
|
|
# Default: true |
|
|
|
|
break_single_constructors: true |
|
|
|
|
|
|
|
|
|
# Whether or not to curry constraints on function. |
|
|
|
|
# |
|
|
|
|
# E.g: @allValues :: Enum a => Bounded a => Proxy a -> [a]@ |
|
|
|
|
# |
|
|
|
|
# Instead of @allValues :: (Enum a, Bounded a) => Proxy a -> [a]@ |
|
|
|
|
# |
|
|
|
|
# Default: false |
|
|
|
|
curried_context: false |
|
|
|
|
|
|
|
|
|
# Align the right hand side of some elements. This is quite conservative |
|
|
|
|
# and only applies to statements where each element occupies a single |
|
|
|
|
# line. |
|
|
|
|
# Possible values: |
|
|
|
|
# - always - Always align statements. |
|
|
|
|
# - adjacent - Align statements that are on adjacent lines in groups. |
|
|
|
|
# - never - Never align statements. |
|
|
|
|
# All default to always. |
|
|
|
|
- simple_align: |
|
|
|
|
cases: always |
|
|
|
|
top_level_patterns: always |
|
|
|
|
records: always |
|
|
|
|
multi_way_if: always |
|
|
|
|
|
|
|
|
|
- trailing_whitespace: {} |
|
|
|
|
|
|
|
|
|
- imports: |
|
|
|
|
align: global |
|
|
|
|
list_align: with_alias |
|
|
|
|
# There are different ways we can align names and lists. |
|
|
|
|
align: group |
|
|
|
|
|
|
|
|
|
# The following options affect only import list alignment. |
|
|
|
|
list_align: after_alias |
|
|
|
|
|
|
|
|
|
# Right-pad the module names to align imports in a group: |
|
|
|
|
pad_module_names: true |
|
|
|
|
|
|
|
|
|
# Long list align style takes effect when import is too long. This is |
|
|
|
|
# determined by 'columns' setting. |
|
|
|
|
long_list_align: inline |
|
|
|
|
|
|
|
|
|
# Align empty list (importing instances) |
|
|
|
|
empty_list_align: inherit |
|
|
|
|
list_padding: 4 |
|
|
|
|
|
|
|
|
|
# List padding determines indentation of import list on lines after import. |
|
|
|
|
# This option affects 'long_list_align'. |
|
|
|
|
list_padding: "module_name" |
|
|
|
|
|
|
|
|
|
# Separate lists option affects formatting of import list for type |
|
|
|
|
# or class. The only difference is single space between type and list |
|
|
|
|
# of constructors, selectors and class functions. |
|
|
|
|
separate_lists: true |
|
|
|
|
|
|
|
|
|
# Space surround option affects formatting of import lists on a single |
|
|
|
|
# line. The only difference is single space after the initial |
|
|
|
|
# parenthesis and a single space before the terminal parenthesis. |
|
|
|
|
space_surround: false |
|
|
|
|
post_qualify: true |
|
|
|
|
|
|
|
|
|
# Enabling this argument will use the new GHC lib parse to format imports. |
|
|
|
|
ghc_lib_parser: true |
|
|
|
|
|
|
|
|
|
- language_pragmas: |
|
|
|
|
# We can generate different styles of language pragma lists. |
|
|
|
|
style: vertical |
|
|
|
|
|
|
|
|
|
# Align affects alignment of closing pragma brackets. |
|
|
|
|
align: true |
|
|
|
|
|
|
|
|
|
remove_redundant: true |
|
|
|
|
language_prefix: LANGUAGE |
|
|
|
|
|
|
|
|
|
- module_header: |
|
|
|
|
indent: 4 |
|
|
|
|
sort: true |
|
|
|
|
separate_lists: true |
|
|
|
|
break_where: inline |
|
|
|
|
open_bracket: next_line |
|
|
|
|
|
|
|
|
|
- records: |
|
|
|
|
equals: same_line |
|
|
|
|
first_field: same_line |
|
|
|
|
field_comment: 2 |
|
|
|
|
deriving: 8 |
|
|
|
|
via: same_line |
|
|
|
|
sort_deriving: true |
|
|
|
|
break_enums: false |
|
|
|
|
break_single_constructors: true |
|
|
|
|
curried_context: false |
|
|
|
|
|
|
|
|
|
# Replace tabs by spaces. |
|
|
|
|
# Number of spaces to use for each tab. Default: 8, as specified by the |
|
|
|
|
# Haskell report. |
|
|
|
|
- tabs: |
|
|
|
|
spaces: 8 |
|
|
|
|
|
|
|
|
|
# Remove trailing whitespace |
|
|
|
|
- trailing_whitespace: {} |
|
|
|
|
|
|
|
|
|
columns: 120 |
|
|
|
|
|
|
|
|
|
newline: native |
|
|
|
|
|
|
|
|
|
language_extensions: |
|
|
|
|
- BangPatterns |
|
|
|
|
- ImportQualifiedPost |
|
|
|
|
- ConstraintKinds |
|
|
|
|
- DataKinds |
|
|
|
|
- DefaultSignatures |
|
|
|
@ -74,7 +141,6 @@ language_extensions:
@@ -74,7 +141,6 @@ language_extensions:
|
|
|
|
|
- MultiParamTypeClasses |
|
|
|
|
- MultiWayIf |
|
|
|
|
- NamedFieldPuns |
|
|
|
|
- NoImplicitPrelude |
|
|
|
|
- OverloadedStrings |
|
|
|
|
- QuasiQuotes |
|
|
|
|
- RecordWildCards |
|
|
|
@ -85,3 +151,9 @@ language_extensions:
@@ -85,3 +151,9 @@ language_extensions:
|
|
|
|
|
- TypeApplications |
|
|
|
|
- TypeFamilies |
|
|
|
|
- ViewPatterns |
|
|
|
|
|
|
|
|
|
# Attempt to find the cabal file in ancestors of the current directory, and |
|
|
|
|
# parse options (currently only language extensions) from that. |
|
|
|
|
# |
|
|
|
|
# Default: true |
|
|
|
|
cabal: true |
|
|
|
|