Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deal with module level comments before the first import/decl
For after we have reworked the top level comments to only attach immediately-preceding ones to a decl
- Loading branch information
Showing
10 changed files
with
152 additions
and
27 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
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
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 @@ | ||
module CExpected where | ||
-- Comment | ||
|
||
foo x = 1 |
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,8 @@ | ||
-- top of module | ||
module EmptyMostlyTrailing where | ||
-- after module header | ||
{ | ||
x = 1 | ||
-- comment | ||
} | ||
-- really trailing |
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 @@ | ||
module TopLevelSemis4 where | ||
|
||
data Foo = Foo | ||
|
||
-- After Foo | ||
; | ||
-- After Foo semi | ||
|
||
data Bar = Bar | ||
|
||
-- After Bar | ||
; |
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,13 @@ | ||
{-# OPTIONS_GHC -fno-warn-redundant-constraints -haddock #-} | ||
module Haddock3 ( | ||
|
||
f | ||
|
||
{-| nested-style doc comments -} | ||
, g | ||
|
||
) where | ||
|
||
f = undefined | ||
g = undefined | ||
|
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,15 @@ | ||
-- top of module | ||
module {- c1 -} ModuleComments1 {- c2 -} | ||
-- c3 | ||
( | ||
-- c4 | ||
foo | ||
-- c5 | ||
) {- c6 -} where {- c7 -} | ||
-- c8 | ||
import Data.Text | ||
-- c9 | ||
|
||
foo = x | ||
|
||
-- eof |
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,25 @@ | ||
-- top of module | ||
module {- c1 -} ModuleComments1 {- c2 -} | ||
-- c3 | ||
( | ||
-- c4 | ||
foo | ||
-- c5 | ||
) {- c6 -} where {- c7 -} | ||
{ | ||
-- c8 | ||
; | ||
-- c9 | ||
|
||
-- c10 | ||
import Data.Text | ||
-- c11 | ||
; | ||
|
||
-- c12 | ||
foo = x | ||
-- c13 | ||
; | ||
-- c14 | ||
} | ||
-- eof |
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 @@ | ||
|
||
module Main where | ||
|
||
-- comment | ||
|
||
x = 1 | ||
|