shifted-ifs
Description | Remove extra indentation for `then` and `else` |
---|---|
Type | Bool |
Default | false |
Ormolu | false |
Since | Unreleased |
This option determines whether the keywords then
and else
should have their own level of indentantion.
false
value (default) adds an extra level of indentation for keywords then
and else
. It looks more consistent with case
branches.
true
adds indentation only for branches. It looks more consistent with if-else blocks in other languages.
Examples
testUser =
if condition
then do
first
branch
else
if another condition
then do
second
branch
else do
third
branch
testUser =
if condition then do
first
branch
else
if another condition then do
second
branch
else do
third
branch
For more examples, see the test files.