-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
Description
For example, consider the following module.
data ExampleData a b = FirstConstructor a | SecondConstructor [b]
mapExampleData :: (a -> c) -> (b -> d) -> ExampleData a b -> ExampleData c d
mapExampleData f g (SecondConstructor ys) = let ys' = map g ys in SecondConstructor ys'
mapExampleData f g (FirstConstructor x) = FirstConstructor (f x)After formatting it using Floskell, the equal sign of the second rule is aligned to a non-existing equal sign.
data ExampleData a b = FirstConstructor a | SecondConstructor [b]
mapExampleData :: (a -> c) -> (b -> d) -> ExampleData a b -> ExampleData c d
mapExampleData f g (SecondConstructor ys)
= let ys' = map g ys in SecondConstructor ys'
mapExampleData f g (FirstConstructor x) = FirstConstructor (f x)The following configuration file was used.
{
"style": "base",
"language": "Haskell2010",
"extensions": [
"DataKinds",
"FlexibleContexts",
"GADTs",
"PolyKinds",
"TypeOperators"
],
"fixities": [
"infixr 5 </>",
"infixr 7 <.>",
"infix 5 \\\\"
],
"formatting": {
"penalties": {
"indent": 1,
"linebreak": 100,
"max-line-length": 80,
"overfull": 100,
"overfull-once": 1000
},
"layout": {
"export-spec-list": "try-oneline",
"import-spec-list": "flex",
"app": "flex",
"infix-app": "try-oneline",
"declaration": "flex",
"con-decls": "try-oneline",
"if": "try-oneline",
"let": "try-oneline",
"list-comp": "try-oneline",
"record": "try-oneline",
"type": "try-oneline"
},
"indent": {
"class": "indent-by 2",
"case": "indent-by 2",
"do": "indent-by 2",
"export-spec-list": "indent-by 2",
"import-spec-list": "indent-by 2",
"let": "align",
"let-in": "align",
"let-binds": "align",
"if": "indent-by 2",
"multi-if": "align-or-indent-by 2",
"deriving": 1,
"where": 1,
"where-binds": "indent-by 1",
"typesig": "align",
"app": "indent-by 2",
"onside": 2
},
"align": {
"case": true,
"class": true,
"import-module": true,
"import-spec": true,
"let-binds": true,
"matches": true,
"record-fields": true,
"where": true,
"limits": [
20,
25
]
},
"group": {
"default": {
"force-linebreak": false,
"spaces": "both",
"linebreaks": "after"
},
"(": {
"force-linebreak": false,
"spaces": "none",
"linebreaks": "after"
},
"( in other": {
"force-linebreak": false,
"spaces": "both",
"linebreaks": "after"
},
"[": {
"force-linebreak": false,
"spaces": "none",
"linebreaks": "after"
},
"[ in type": {
"force-linebreak": false,
"spaces": "none",
"linebreaks": "after"
}
},
"op": {
"default": {
"force-linebreak": false,
"spaces": "both",
"linebreaks": "before"
},
",": {
"force-linebreak": false,
"spaces": "after",
"linebreaks": "before"
},
"-> in expression": {
"force-linebreak": false,
"spaces": "both",
"linebreaks": "after"
}
},
"options": {
"align-sum-type-decl": true,
"decl-no-blank-lines": [],
"flexible-oneline": true,
"preserve-vertical-space": false,
"sort-import-lists": true,
"sort-pragmas": true,
"split-language-pragmas": true,
"sort-imports": [
{
"prefixes": [
"Prelude"
],
"order": "sorted"
},
{
"prefixes": [
""
],
"order": "sorted"
},
{
"prefixes": [
"HST"
],
"order": "sorted"
}
]
}
}
}