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

Don't generate names with primes #20

Open
domenkozar opened this issue Nov 14, 2016 · 4 comments
Open

Don't generate names with primes #20

domenkozar opened this issue Nov 14, 2016 · 4 comments

Comments

@domenkozar
Copy link
Collaborator

Elm 0.18 (will be released today) won't support primes in names anymore.

We should make sure to respect that.

https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.18.md#no-more-primes

cc @krisajenkins

@mattjbray
Copy link
Collaborator

You can pass a function in Options.fieldLabelModifier that removes primes from your record field names: https://github.com/krisajenkins/elm-export/blob/master/src/Elm/Common.hs#L8

Where else are you getting primes that you need to remove?

@domenkozar
Copy link
Collaborator Author

Thanks, that should do! Would you accept a PR that does this upstream? For 0.18 and onwards this will cause issues for anyone.

@domenkozar
Copy link
Collaborator Author

That still doesn't replace everything, see the result: https://gist.github.com/anonymous/2406725a44b24288eb2a391a0210419b

@mattjbray
Copy link
Collaborator

@domenkozar can you provide a minimal Haskell snippet that generates invalid Elm 0.18 code?

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