mdgriffith / elm-codegen

https://package.elm-lang.org/packages/mdgriffith/elm-codegen/latest/
BSD 3-Clause "New" or "Revised" License
138 stars 16 forks source link

Generating case statements to match on ints #99

Closed r-k-b closed 2 months ago

r-k-b commented 2 months ago

I'm upgrading to elm-codegen 5.0.0, but stuck on trying to generate a case expression like this:

case int of
    0 ->
        True
    1 ->
        False
    _ ->
        True

It seems as though it's not possible to pattern match on Int values.

Thanks for your help, elm-codegen is great! :heart:

r-k-b commented 1 month ago

terribly sorry to be a bother @mdgriffith, but could I trouble you for a 5.0.2 version that includes the fix? thanks so much! :pray:

image

mdgriffith commented 1 month ago

Oh whoops I didn't see that PR was attached to this issue! Thank you for the ping.

Yes, 5.1.0 is now released! Sorry for the delay 🙏