@@ -105,30 +105,28 @@ isEol :: Char -> Bool
105105isEol '\n' = True
106106isEol _ = False
107107
108+-- | A parser that succeeds at the end of the line
108109eol :: MonadicParsing m => m ()
109110eol = (satisfy isEol *> pure ()) <|> lookAhead eof <?> "end of line"
110111
111112{- | Consumes a single-line comment
112113
113114@
114− SingleLineComment_t ::= '--' EOL_t
115− | '--' ~DocCommentMarker_t ~EOL_t* EOL_t
116− ;
115+ SingleLineComment_t ::= '--' ~EOL_t* EOL_t ;
117116@
118117 -}
119118singleLineComment :: MonadicParsing m => m ()
120−singleLineComment = try (string "--" *> eol *> pure ())
121− <|> try (string "--" *> many simpleWhiteSpace *>
122− many (satisfy (not . isEol)) *>
123− eol *> pure ())
124− <?> ""
119+singleLineComment = (string "--" *>
120+ many (satisfy (not . isEol)) *>
121+ eol *> pure ())
122+ <?> "single-line comment"
125123
126124{- | Consumes a multi-line comment
127125
128126@
129127 MultiLineComment_t ::=
130128 '{ -- }'
131− | '{ -' ~DocCommentMarker_t InCommentChars_t
129+ | '{ -' InCommentChars_t
132130 ;
133131@
134132
@@ -154,7 +152,7 @@ multiLineComment = try (string "{-" *> (string "-}") *> pure ())
154152 startEnd :: String
155153 startEnd = "{}-"
156154
157−{-| Parses a documentation comment (similar to haddock) given a marker character
155+{-| Parses a documentation comment
158156
159157@
160158 DocComment_t ::= '|||' ~EOL_t* EOL_t