Skip to content

Commit cf7d1ee

Browse files
committed
Add scratch .test files in the root
- Split into blocks and block haddocks
1 parent 65a87b1 commit cf7d1ee

8 files changed

+155
-0
lines changed

empty-comment-block-haddocks.test

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{- |-}
2+
haddockAboveMultiEmpty = 1
3+
4+
{- | -}
5+
haddockAboveMultiEmptySpace = 1
6+
7+
{- |
8+
9+
-}
10+
haddockAboveMultiEmptyLines = 1
11+
12+
haddockBelowMultiEmpty = 1
13+
{- ^-}
14+
15+
haddockBelowMultiEmptySpace = 1
16+
{- ^-}
17+
18+
haddockBelowMultiEmptyLines = 1
19+
{- ^
20+
21+
-}

empty-comment-blocks.test

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{-##-}
2+
3+
{--}
4+
commentMultiEmpty = 1
5+
6+
{- -}
7+
commentMultiEmptySpace = 1
8+
9+
{-
10+
11+
-}
12+
commentMultiEmptyLines = 1

empty-comment-mixed.test

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- |
2+
--
3+
-- Comment with blank line comment space above and below.
4+
--
5+
commentWithSpace = 1
6+
7+
-- | Introduction line.
8+
--
9+
-- Comment with introduction line above and blank line below.
10+
--
11+
CommentWithSpaceOnlyAfter = 1

empty-comment-nonempty.test

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- |
2+
--
3+
--
4+
-- foo
5+
haddockAboveIntoNonEmpty = 1
6+
7+
haddockBelowIntoNonEmpty = 1
8+
-- ^
9+
--
10+
--
11+
-- foo

empty-comment-record.test

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
data HaddockSingle = HaddockSingle
2+
{ haddockFieldEmptyBelow :: Int
3+
-- ^
4+
-- |
5+
, haddockFieldAboveEmpty :: Int
6+
, haddockFieldEmptyAfter :: Int -- ^
7+
}
8+
9+
data HaddockMulti = HaddockMulti
10+
{ haddockFieldEmptyBelow :: Int
11+
{- ^-}
12+
{- |-}
13+
, haddockFieldAboveEmpty :: Int
14+
, haddockFieldEmptyAfter :: Int {- ^-}
15+
}

empty-comment-single.test

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-- |
2+
haddockAboveSingle = 1
3+
4+
haddockBelowSingle = 1
5+
-- ^

empty-comment-singles.test

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- |
2+
--
3+
haddockAboveSingles = 1
4+
5+
-- |
6+
-- >>>
7+
haddockAboveDoctest = 1

example.test

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
-- | AA
2+
--
3+
--
4+
-- BB
5+
--
6+
--
7+
-- Comment with blank line comment space above and below.
8+
--
9+
--
10+
-- CC
11+
--
12+
--
13+
--
14+
--
15+
commentWithSpace = 1
16+
17+
-- |
18+
--
19+
-- 11
20+
--
21+
--
22+
-- 22
23+
--
24+
--
25+
-- Comment with blank line comment space above and below.
26+
--
27+
--
28+
-- 33
29+
--
30+
commentWithSpace1 = 1
31+
32+
commentWithSpace2 = 1
33+
-- ^
34+
--
35+
-- ZZ
36+
--
37+
--
38+
-- YY
39+
--
40+
--
41+
-- Comment with blank line comment space above and below.
42+
--
43+
--
44+
-- XX
45+
--
46+
47+
-- | A comment as a string.
48+
49+
{- |-}
50+
{--}
51+
52+
--
53+
54+
{-##-}
55+
56+
-- |
57+
-- >>> :{
58+
-- let
59+
-- x = 1
60+
-- y = 2
61+
-- in x + y + multiline
62+
-- :}
63+
-- 6
64+
multiline = 3
65+
66+
{- | >>> :{
67+
let x = 1
68+
y = 2
69+
in x + y + works
70+
:}
71+
6
72+
-}
73+
works = 3

0 commit comments

Comments
 (0)