Skip to content
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

Use cabal-fmt as a cabal-modifier? #64

Closed
nomeata opened this issue Jan 3, 2023 · 3 comments
Closed

Use cabal-fmt as a cabal-modifier? #64

nomeata opened this issue Jan 3, 2023 · 3 comments

Comments

@nomeata
Copy link

nomeata commented Jan 3, 2023

I’d like to write tools that edit my cabal file in place, and cabal-fmt seems to be the most suitable starting point. But all the interesting code seems to be in the internal cabal-fmt-internal sublibrary, so I cannot easily extend it.

Do you plan to make the this functionality available for extension?

Or, alternative, what’s your advise for a cabal-modifying tool?

@phadej
Copy link
Owner

phadej commented Jan 3, 2023

Do you plan to make the this functionality available for extension?

No

Or, alternative, what’s your advise for a cabal-modifying tool?

Idk

@phadej
Copy link
Owner

phadej commented Jan 3, 2023

Or, alternative, what’s your advise for a cabal-modifying tool?

... or ping people on haskell/cabal#7337 or https://github.com/haskell/cabal/projects/9

@nomeata
Copy link
Author

nomeata commented Jan 3, 2023

Ok, thanks :-)

I guess since I only have to change the value of existing fields, for my initial experiments I can use the Cabal-syntax parser to get fields with source positions, calculate the new values, and then splice them into the original source.

@nomeata nomeata closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants