GithubHelp home page GithubHelp logo

Comments (5)

abooij avatar abooij commented on May 30, 2024

Some of these combinators have different semantics than Parsec's. Code will not work as-is, even with a fake translation layer.

many1 is not really "missing", it's a misnomer that has been purged. some is the new many1. Either the translation is easy, and might as well be done manually in translating code from Parsec to Megaparsec, or it is not easy, and cannot be done by merely adding drop-in lookalikes.

from megaparsec.

neongreen avatar neongreen commented on May 30, 2024

some is the new many1

It should really be mentioned in Text.Megaparsec.Combinator (in fact, it should be reexported properly, because people won't notice it if it's simply mentioned in module description). Alternative is a very little-known class.

from megaparsec.

neongreen avatar neongreen commented on May 30, 2024

Hm, on the other hand they are all reexported in Text.Megaparsec.Prim, so perhaps merely adding a link in Text.Megaparsec.Combinator would be enough after all.

from megaparsec.

mrkkrp avatar mrkkrp commented on May 30, 2024

@recursion-ninja, This library has different naming conventions. many1 is called some and spaces is called space. There is nothing you need to define manually, just read the documentation. Some of combinators are placed in different modules, but there are reasons for it, this is different library.

@neongreen, I don't think we should mention this. The library is a fork and it's similar to Parsec and it does all the things Parsec does, but of course a bit differently. The library should be self-sufficient and we should stop define it in terms of Parsec. I don't like this trend “please look like Parsec or you will be never widely used”. There will be not a single step in that direction, that's not what I wanted when I started to work on this.

Closing.

from megaparsec.

recursion-ninja avatar recursion-ninja commented on May 30, 2024

At the time I made this suggestion I didn't realize that Megaparsec was diverging from Parsec with breaking changes to be a better standalone parsing library, not an improvement to Parsec.

The new documentation does clear this up!

from megaparsec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.