I have a really simple code (in GHC 8.10.4/stack ghci 17.12):
module T where
data D = A | B | C deriving (Eq, Show)
fn :: D -> Int
fn x =
case x of
A ->
-- | Test
1
B -> 2
C -> 3
The thing is, whether I replace | by ^ or use the multi-lines comment, I get this error:
T.hs:9:7: error: parse error on input ‘-- | Test’
|
9 | -- | Test
| ^^^^^^^^^
Does the parser mismatch my comment with something else? or is there a special syntax that look likes comments?