Skip to content

Commit

Permalink
Add scratch .test files in the root
Browse files Browse the repository at this point in the history
- Split into blocks and block haddocks
  • Loading branch information
philderbeast committed Aug 3, 2024
1 parent 65a87b1 commit cf7d1ee
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 0 deletions.
21 changes: 21 additions & 0 deletions empty-comment-block-haddocks.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{- |-}
haddockAboveMultiEmpty = 1

{- | -}
haddockAboveMultiEmptySpace = 1

{- |

-}
haddockAboveMultiEmptyLines = 1

haddockBelowMultiEmpty = 1
{- ^-}

haddockBelowMultiEmptySpace = 1
{- ^-}

haddockBelowMultiEmptyLines = 1
{- ^

-}
12 changes: 12 additions & 0 deletions empty-comment-blocks.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{-##-}

{--}
commentMultiEmpty = 1

{- -}
commentMultiEmptySpace = 1

{-

-}
commentMultiEmptyLines = 1
11 changes: 11 additions & 0 deletions empty-comment-mixed.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- |
--
-- Comment with blank line comment space above and below.
--
commentWithSpace = 1

-- | Introduction line.
--
-- Comment with introduction line above and blank line below.
--
CommentWithSpaceOnlyAfter = 1
11 changes: 11 additions & 0 deletions empty-comment-nonempty.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- |
--
--
-- foo
haddockAboveIntoNonEmpty = 1

haddockBelowIntoNonEmpty = 1
-- ^
--
--
-- foo
15 changes: 15 additions & 0 deletions empty-comment-record.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
data HaddockSingle = HaddockSingle
{ haddockFieldEmptyBelow :: Int
-- ^
-- |
, haddockFieldAboveEmpty :: Int
, haddockFieldEmptyAfter :: Int -- ^
}

data HaddockMulti = HaddockMulti
{ haddockFieldEmptyBelow :: Int
{- ^-}
{- |-}
, haddockFieldAboveEmpty :: Int
, haddockFieldEmptyAfter :: Int {- ^-}
}
5 changes: 5 additions & 0 deletions empty-comment-single.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- |
haddockAboveSingle = 1

haddockBelowSingle = 1
-- ^
7 changes: 7 additions & 0 deletions empty-comment-singles.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- |
--
haddockAboveSingles = 1

-- |
-- >>>
haddockAboveDoctest = 1
73 changes: 73 additions & 0 deletions example.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
-- | AA
--
--
-- BB
--
--
-- Comment with blank line comment space above and below.
--
--
-- CC
--
--
--
--
commentWithSpace = 1

-- |
--
-- 11
--
--
-- 22
--
--
-- Comment with blank line comment space above and below.
--
--
-- 33
--
commentWithSpace1 = 1

commentWithSpace2 = 1
-- ^
--
-- ZZ
--
--
-- YY
--
--
-- Comment with blank line comment space above and below.
--
--
-- XX
--

-- | A comment as a string.

{- |-}
{--}

--

{-##-}

-- |
-- >>> :{
-- let
-- x = 1
-- y = 2
-- in x + y + multiline
-- :}
-- 6
multiline = 3

{- | >>> :{
let x = 1
y = 2
in x + y + works
:}
6
-}
works = 3

0 comments on commit cf7d1ee

Please sign in to comment.