-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve comment placement in if-then-else blocks
- Loading branch information
1 parent
1956be3
commit 9b3a78f
Showing
18 changed files
with
161 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
data/examples/declaration/value/function/if-single-line-functions-do-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
foo x = do | ||
y <- quux | ||
if x > 2 | ||
then bar x | ||
else baz y |
5 changes: 5 additions & 0 deletions
5
data/examples/declaration/value/function/if-single-line-functions-do.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
foo x = do | ||
y <- quux | ||
if x > 2 | ||
then bar x | ||
else baz y |
4 changes: 4 additions & 0 deletions
4
data/examples/declaration/value/function/if-single-line-functions-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
foo x = | ||
if x > 2 | ||
then bar x | ||
else baz x |
4 changes: 4 additions & 0 deletions
4
data/examples/declaration/value/function/if-single-line-functions.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
foo x = | ||
if x > 2 | ||
then bar x | ||
else baz x |
7 changes: 7 additions & 0 deletions
7
data/examples/declaration/value/function/if-with-comment-above-branches-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
foo = | ||
if undefined | ||
-- then comment | ||
then undefined | ||
-- else comment | ||
else do | ||
undefined |
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
data/examples/declaration/value/function/if-with-comment-before-do-blocks-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
foo = | ||
if something | ||
-- then comment | ||
then do | ||
stuff | ||
stuff | ||
-- else comment | ||
else do | ||
stuff | ||
stuff |
10 changes: 10 additions & 0 deletions
10
data/examples/declaration/value/function/if-with-comment-before-do-blocks.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
foo = | ||
if something | ||
-- then comment | ||
then do | ||
stuff | ||
stuff | ||
-- else comment | ||
else do | ||
stuff | ||
stuff |
14 changes: 14 additions & 0 deletions
14
data/examples/declaration/value/function/if-with-comment-in-branches-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
foo = | ||
if x | ||
then | ||
-- comment 1 | ||
-- comment 2 | ||
case a of | ||
Just b -> _ | ||
Nothing -> _ | ||
else | ||
-- comment 3 | ||
-- comment 4 | ||
case a of | ||
Just b -> _ | ||
Nothing -> _ |
12 changes: 12 additions & 0 deletions
12
data/examples/declaration/value/function/if-with-comment-in-branches-with-functions-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
foo = | ||
if x | ||
then | ||
-- comment 1 | ||
-- comment 2 | ||
foo 1 2 3 | ||
else | ||
-- comment 3 | ||
-- comment 4 | ||
foo | ||
"here" | ||
"there" |
12 changes: 12 additions & 0 deletions
12
data/examples/declaration/value/function/if-with-comment-in-branches-with-functions.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
foo = | ||
if x | ||
then | ||
-- comment 1 | ||
-- comment 2 | ||
foo 1 2 3 | ||
else | ||
-- comment 3 | ||
-- comment 4 | ||
foo | ||
"here" | ||
"there" |
14 changes: 14 additions & 0 deletions
14
data/examples/declaration/value/function/if-with-comment-in-branches.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
foo = | ||
if x | ||
then | ||
-- comment 1 | ||
-- comment 2 | ||
case a of | ||
Just b -> _ | ||
Nothing -> _ | ||
else | ||
-- comment 3 | ||
-- comment 4 | ||
case a of | ||
Just b -> _ | ||
Nothing -> _ |
10 changes: 10 additions & 0 deletions
10
data/examples/declaration/value/function/if-with-comment-next-to-keyword-out.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
foo = | ||
if x | ||
then -- comment 1 | ||
-- comment 2 | ||
foo 1 2 3 | ||
else -- comment 3 | ||
-- comment 4 | ||
foo | ||
"here" | ||
"there" |
10 changes: 10 additions & 0 deletions
10
data/examples/declaration/value/function/if-with-comment-next-to-keyword.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
foo = | ||
if x | ||
then -- comment 1 | ||
-- comment 2 | ||
foo 1 2 3 | ||
else -- comment 3 | ||
-- comment 4 | ||
foo | ||
"here" | ||
"there" |
8 changes: 0 additions & 8 deletions
8
data/examples/declaration/value/function/if-with-comment-out.hs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters