Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report error contexts. #79

Merged
merged 1 commit into from
Mar 28, 2015
Merged

Report error contexts. #79

merged 1 commit into from
Mar 28, 2015

Conversation

mf59816
Copy link

@mf59816 mf59816 commented Sep 25, 2014

This obsoletes #71.

details and motivation

the following code can be copied to tests and run in both this patch and before. the comment at the end explains the difference: with this patch, the <?> contexts will be contained in the error message.

module Main (main) where

import Data.Attoparsec.ByteString.Char8

main :: IO ()
main = print $ parseOnly (many1 "*" <?> "stars") "#**!"

-- 0.12.1.0 *" <?> "i(before #71):
-- Left "Failed reading: takeWith"
--
-- 0.12.2.0 (#71):
-- Left "stars: Failed reading: takeWith"

Include contexts in the Left value of eitherResult, parseOnly
(all string types).
@jkarni
Copy link

jkarni commented Jan 20, 2015

Any updates on this?

bos added a commit that referenced this pull request Mar 28, 2015
@bos bos merged commit bb88081 into haskell:master Mar 28, 2015
This was referenced Mar 28, 2015
mf59816 pushed a commit to liqd/thentos that referenced this pull request Mar 28, 2015
- Bump attoparsec to contain haskell/attoparsec#79
- Remove work-around for haskell/cabal#2023
  (we don't need --alow-newer any more)
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Dec 31, 2019
0.13.2.1
* Improved performance of Data.Attoparsec.Text.asciiCI

0.13.2.0
* pure is now strict in Position

0.13.1.0
* runScanner now correctly returns the final state
  (haskell/attoparsec#105).
* Parser, ZeptoT, Buffer, and More now expose Semigroup instances.
* Parser, and ZeptoT now expose MonadFail instances.

0.13.0.2
* Restore the fast specialised character set implementation for Text
* Move testsuite from test-framework to tasty
* Performance optimization of takeWhile and takeWhile1

0.13.0.1
* Fixed a bug in the implementations of inClass and notInClass for
  Text (haskell/attoparsec#103)

0.13.0.0
* Made the parser type in the Zepto module a monad transformer (needed
  by aeson's string unescaping parser).

0.12.1.6
* Fixed a case folding bug in the ByteString version of stringCI.

0.12.1.5
* Fixed an indexing bug in the new Text implementation of string,
  reported by Michel Boucey.

0.12.1.4
* Fixed a case where the string parser would consume an unnecessary
  amount of input before failing a match, when it could bail much
  earlier (haskell/attoparsec#97)
* Added more context to error messages
  (haskell/attoparsec#79)

0.12.1.3
* Fixed incorrect tracking of Text lengths
  (haskell/attoparsec#80)
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 14, 2020
0.13.2.1
* Improved performance of Data.Attoparsec.Text.asciiCI

0.13.2.0
* pure is now strict in Position

0.13.1.0
* runScanner now correctly returns the final state
  (haskell/attoparsec#105).
* Parser, ZeptoT, Buffer, and More now expose Semigroup instances.
* Parser, and ZeptoT now expose MonadFail instances.

0.13.0.2
* Restore the fast specialised character set implementation for Text
* Move testsuite from test-framework to tasty
* Performance optimization of takeWhile and takeWhile1

0.13.0.1
* Fixed a bug in the implementations of inClass and notInClass for
  Text (haskell/attoparsec#103)

0.13.0.0
* Made the parser type in the Zepto module a monad transformer (needed
  by aeson's string unescaping parser).

0.12.1.6
* Fixed a case folding bug in the ByteString version of stringCI.

0.12.1.5
* Fixed an indexing bug in the new Text implementation of string,
  reported by Michel Boucey.

0.12.1.4
* Fixed a case where the string parser would consume an unnecessary
  amount of input before failing a match, when it could bail much
  earlier (haskell/attoparsec#97)
* Added more context to error messages
  (haskell/attoparsec#79)

0.12.1.3
* Fixed incorrect tracking of Text lengths
  (haskell/attoparsec#80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants