@@ -105,30 +105,28 @@ isEol :: Char -> Bool
105isEol '\n' = True
105isEol '\n' = True
106isEol _ = False
106isEol _ = False
108+-- | A parser that succeeds at the end of the line
108eol :: MonadicParsing m => m ()
109eol :: MonadicParsing m => m ()
109eol = (satisfy isEol *> pure ()) <|> lookAhead eof <?> "end of line"
110eol = (satisfy isEol *> pure ()) <|> lookAhead eof <?> "end of line"
111{- | Consumes a single-line comment
112{- | Consumes a single-line comment
114− SingleLineComment_t ::= '--' EOL_t
115+ SingleLineComment_t ::= '--' ~EOL_t* EOL_t ;
115− | '--' ~DocCommentMarker_t ~EOL_t* EOL_t
119singleLineComment :: MonadicParsing m => m ()
118singleLineComment :: MonadicParsing m => m ()
120−singleLineComment = try (string "--" *> eol *> pure ())
119+singleLineComment = (string "--" *>
121− <|> try (string "--" *> many simpleWhiteSpace *>
122− many (satisfy (not . isEol)) *>
120+ many (satisfy (not . isEol)) *>
123− eol *> pure ())
121+ eol *> pure ())
124− <?> ""
122+ <?> "single-line comment"
126{- | Consumes a multi-line comment
124{- | Consumes a multi-line comment
129 MultiLineComment_t ::=
127 MultiLineComment_t ::=
131− | '{ -' ~DocCommentMarker_t InCommentChars_t
129+ | '{ -' InCommentChars_t
@@ -154,7 +152,7 @@ multiLineComment = try (string "{-" *> (string "-}") *> pure ())
154 startEnd :: String
152 startEnd :: String
155 startEnd = "{}-"
153 startEnd = "{}-"
157−{-| Parses a documentation comment (similar to haddock) given a marker character
155+{-| Parses a documentation comment
160 DocComment_t ::= '|||' ~EOL_t* EOL_t
158 DocComment_t ::= '|||' ~EOL_t* EOL_t