{"action":"created","issue":{"url":"https://api.github.com/repos/mrkkrp/megaparsec/issues/74","labels_url":"https://api.github.com/repos/mrkkrp/megaparsec/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/mrkkrp/megaparsec/issues/74/comments","events_url":"https://api.github.com/repos/mrkkrp/megaparsec/issues/74/events","html_url":"https://github.com/mrkkrp/megaparsec/issues/74","id":120051591,"number":74,"title":"Combinators like Data.Attoparsec.Bytestring missing","user":{"login":"benma","id":1225267,"avatar_url":"https://avatars.githubusercontent.com/u/1225267?v=3","gravatar_id":"","url":"https://api.github.com/users/benma","html_url":"https://github.com/benma","followers_url":"https://api.github.com/users/benma/followers","following_url":"https://api.github.com/users/benma/following{/other_user}","gists_url":"https://api.github.com/users/benma/gists{/gist_id}","starred_url":"https://api.github.com/users/benma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benma/subscriptions","organizations_url":"https://api.github.com/users/benma/orgs","repos_url":"https://api.github.com/users/benma/repos","events_url":"https://api.github.com/users/benma/events{/privacy}","received_events_url":"https://api.github.com/users/benma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-02T22:36:33Z","updated_at":"2015-12-03T12:43:32Z","closed_at":null,"body":"Hi\r\n\r\nI wanted to parse a ByteString and match ByteStrings etc., but in Text.Megaparsec.ByteString, there are no combinators to make it easier, i.e. a `string` combinators that returns a ByteString.\r\n\r\nIt would be nice to add the combinators from [attoparsec](https://hackage.haskell.org/package/attoparsec-0.13.0.1/docs/Data-Attoparsec-ByteString.html).\r\n\r\nAre there any plans for this?"},"comment":{"url":"https://api.github.com/repos/mrkkrp/megaparsec/issues/comments/161622761","html_url":"https://github.com/mrkkrp/megaparsec/issues/74#issuecomment-161622761","issue_url":"https://api.github.com/repos/mrkkrp/megaparsec/issues/74","id":161622761,"user":{"login":"mrkkrp","id":8165792,"avatar_url":"https://avatars.githubusercontent.com/u/8165792?v=3","gravatar_id":"","url":"https://api.github.com/users/mrkkrp","html_url":"https://github.com/mrkkrp","followers_url":"https://api.github.com/users/mrkkrp/followers","following_url":"https://api.github.com/users/mrkkrp/following{/other_user}","gists_url":"https://api.github.com/users/mrkkrp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkkrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkkrp/subscriptions","organizations_url":"https://api.github.com/users/mrkkrp/orgs","repos_url":"https://api.github.com/users/mrkkrp/repos","events_url":"https://api.github.com/users/mrkkrp/events{/privacy}","received_events_url":"https://api.github.com/users/mrkkrp/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T12:43:32Z","updated_at":"2015-12-03T12:43:32Z","body":"Well, first of all if you have actual text, why not to deal with it as `Text`, not `ByteString`?\r\n\r\nAnother thing to note is that since most part of your big file shouldn't parsed, you can leverage the fact that Megaparsec supports incremental parsing (something that's missing in Parsec). This means that you can search where actual work for Megaparsec begins and use something like `runParser'` to start parsing from the middle of the file. You can also supply initial textual position (line, column), so it's displayed in error messages properly.\r\n\r\nIf your file is *really* big and speed matters Attoparsec may be a better choice. Megaparsec is usually good for source code and the like, when size of input is usually not very big, but error messages are important."}}