-
Notifications
You must be signed in to change notification settings - Fork 13
add blogpost on comment preserving cabal parser #27
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
Conversation
Bodigrim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
Co-authored-by: ˌbodʲɪˈɡrʲim <[email protected]>
|
yes, you should link to your own article as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leana8959 Thanks a lot for this article. Some stuff to revisit, I tried to suggest fixes as much as I could, but some things like the back-and-forth between preterite and present throughout the file need your attention.
Also take a look at how the paragraphs are rendered in markdown, I noticed a lot more line breaks in the markdown than what is actually rendered. :)
| This is because cabal can't do _exact printing_ yet. | ||
| Concretely this means the spaces and empty lines, comments, common stanzas, and if conditions that | ||
| you add will be lost. | ||
| Adding an exact printer will allow cabal to modify the cabal files automatically and loselessly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Adding an exact printer will allow cabal to modify the cabal files automatically and loselessly! | |
| Adding an exact-print parser will allow `cabal` to parse a package manifest and modify it without losing any details (_losslessly_)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, I meant to say modify in the sense of modifying a cabal file on disk, so it would require both exact-parse and exact-print.
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Co-authored-by: Hécate <[email protected]>
Indeed! I use hardwrap in my editor at around 100 columns, should I remove the hard breaks? I thought they are ignored by the markdown render in the end anyway and didn't pay attention to them. |
|
@leana8959 They are all ignored by the markdown renderer, but glad to know that the lack of explicit paragraph separation is intentional then. :) |
Kleidukos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot @leana8959
Hello, I wrote about the design and my findings during the implementation of the comment preserving parser, which is part of the exact print project funded by the Haskell Foundation.
@jappeace is there something you want me to add/modify? How should I link to my blog in the article?
I proof-read multiple times, but there might still be typos or weird formulations, do let me know and I'll fix them :)