-
Notifications
You must be signed in to change notification settings - Fork 1
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
Compatibility goals? #2
Comments
I think it makes sense for the parser to be compatible. It's hard to do without trial-and-error since there is no documented grammar. |
The goal is to be able to build all packages from Hackage. It's far from there. |
That's good to hear.
There is this, but it doesn't seem to cover indention (possibly because it is context-sensitive then?) comment in Fields/Parser.hs. There is a paper with a modification of Happy that provides an academic underpinning of indention: Principled Parsing for Indention-Sensitive Languages. Thanks to @TeofilC for making me aware of this. |
My parser can deal with Haskell style indentation, so it should be adaptable to Cabal too. |
This looks like a very interesting project, but I am wondering what the goal is, is this supposed to be compatible with a large fraction of packages on Hackage? Or is that simply not a goal?
For example, parsec-2.1.0.1 has tabs and carriage return in its cabal file. I was able to adjust the parser to accept that. But it also uses braces, which I hadn't seen before. And now I don't know whether it makes sense to start to have MicroCabal parse this.
Since I suspect that the code will be more minimal if unnecessary features are avoided, it's a trade-off: Either the code is uglier and more compatible, or it is prettier and less compatible. To align contributors to the project goals, it would make sense to specify the goals in the readme file.
The text was updated successfully, but these errors were encountered: