megaparsec icon indicating copy to clipboard operation
megaparsec copied to clipboard

Industrial-strength monadic parser combinator library

Results 23 megaparsec issues
Sort by recently updated
recently updated
newest added

When you have a parser like: ``` label name (optional p *> optional q) *> r ``` If `r` fails, the hints from `p` and `q` are usually reported as...

question

``` ghci> import Text.Megaparsec ghci> import Text.Megaparsec.Byte.Lexer ghci> parse (decimal @() @ByteString @_ @Word16) "" "65536" Right 0 ``` Reasonably, a parse error is expected, although from the type constraint...

documentation

``` ghci> parse (decimal @() @ByteString @_ @Float) "" "655361200000" Right 6.5536125e11 ghci> (== 655361250000) parse (decimal @() @ByteString @_ @Float) "" "655361200000" Right True ghci> (== 655361200000) parse (decimal...

bug

Could be useful when Megaparsec is used to parse binary data.

feature-request

One useful feature that `megaparsec` has compared to `parsec` is the ability to get the remainder of the input. In fact, I think it is so useful that it would...

feature-request

https://github.com/mrkkrp/megaparsec/blob/87d425759ab5c290c1cb54b1d52c7bffaae1e1ff/Text/Megaparsec/Stream.hs#L291 Would you consider adding a primitive combinator for `breakOn`? Or is that something you've already discussed before? http://hackage.haskell.org/package/text-1.2.4.0/docs/Data-Text-Lazy.html#v:breakOn Something like `takeUpto`? If so, I might be able to open...

feature-request

I'm building a parser that accepts custom token stream. I've made [TokenStream](http://hackage.haskell.org/package/lexer-applicative-2.1.0.2/docs/Language-Lexer-Applicative.html#t:TokenStream) (from `lexer-applicative`) an instance of `Stream` ```haskell instance Stream (TokenStream (L tok)) where ``` And that's wonderful, everything...

question
feature-request

`errorBundlePretty` is not working properly if input contains full-width character. ![image](https://user-images.githubusercontent.com/8275026/64916772-af393c80-d7bf-11e9-9096-91ecdbb177a4.png) Character pointer (`^`) should be pointing '이', but it is pointing the wrong position. Full-width character should be replaced...

bug

Here is an example demonstrating that we get different error messages depending on how we parethesize `a b c`. ```haskell import Data.Void import Text.Megaparsec import Text.Megaparsec.Char.Lexer type Parser = Parsec...

bug

Attoparsec has it: https://hackage.haskell.org/package/attoparsec-0.13.2.2/docs/Data-Attoparsec-Text.html#v:scan.

enhancement
feature-request