@@ -195,12 +195,14 @@ anyLine = do
195 -- manyTill anyChar newline
195 -- manyTill anyChar newline
196 inp <- getInput
196 inp <- getInput
197 pos <- getPosition
197 pos <- getPosition
198− let (this, rest) = break (=='\n') inp
198+ case break (=='\n') inp of
199+ (this, '\n':rest) -> do
200+ -- needed to persuade parsec that this won't match an empty string:
199− setInput rest
202+ setInput rest
200− let newpos = incSourceLine (setSourceColumn pos 0) 1
203+ setPosition $ incSourceLine (setSourceColumn pos 1) 1
202− void (char '\n') <|> (guard (not $ null this) >> eof)
203− return this
204+ return this
205-- | Like @manyTill@, but reads at least one item.
207-- | Like @manyTill@, but reads at least one item.
206many1Till :: Parser [tok] st a
208many1Till :: Parser [tok] st a