Comments (5)
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.
some
is the newmany1
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.
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.
@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.
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)
- [proposed labels: question, feature request] best practices for stateful matching of simple patterns HOT 4
- Question: mergeError HOT 2
- Greedy combinators HOT 11
- Problematic `IsString` instance HOT 4
- Processing input prior to parsing while retaining source positions HOT 1
- Mention in documentation that `parse` is an alias for `runParser` HOT 1
- MonadAccum instance for ParsecT HOT 5
- Tabs are not handled correctly when errors are rendered HOT 4
- Indentation error lost in alternative HOT 3
- `local` clears all hints HOT 5
- 9.4 migration: getSourcePos now requires `Monad m =>` HOT 6
- Remove/upgrade version bounds of executable `test-debug` from megaparsec-tests HOT 2
- Add `drop` to `Text.Megaparsec` HOT 3
- Wrong source locations on `unexpected end of input` with custom tokens HOT 2
- get col, row (as Int's) and error message of the first TrivialError HOT 2
- deepseq-1.5? HOT 1
- Error context with additional source positions HOT 4
- Parsing hexadecimal floats HOT 1
- Rewrite rules for parser primitives HOT 1
- How to use `Operator` from tutorial HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from megaparsec.