elm-export icon indicating copy to clipboard operation
elm-export copied to clipboard

Don't generate names with primes

Open domenkozar opened this issue 8 years ago • 4 comments

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

domenkozar avatar Nov 14 '16 12:11 domenkozar

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?

mattjbray avatar Nov 22 '16 23:11 mattjbray

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 avatar Nov 26 '16 11:11 domenkozar

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

domenkozar avatar Nov 27 '16 06:11 domenkozar

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

mattjbray avatar Feb 21 '17 20:02 mattjbray