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

Convert '_' to '-' in values #69

Open
sapek opened this issue Mar 25, 2024 · 0 comments
Open

Convert '_' to '-' in values #69

sapek opened this issue Mar 25, 2024 · 0 comments

Comments

@sapek
Copy link
Contributor

sapek commented Mar 25, 2024

When deriving option names from constructors, underscore is converted to '-' using asName function. The same logic should apply when deriving values for options of algebraic types.

A canonical scenario that can't be implemented due to this issue is an option to enable warnings. The almost universal convention for this in compilers is something like:

-Wunused-imports

With cmdargs the best we can do today, at least w/o manually implementing Data instance, is either:

-Wunused_imports

or

--Wunused-imports

I think the fix for this would be to simply replace toLower with asName in reader_ function. Obviously this would be a breaking change.

Would you be interested in this, either as a breaking change, or with a new annotation to enable this behavior?

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

1 participant