tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.23k stars 85 forks source link

Force enum payloads #1890

Closed jneem closed 2 months ago

jneem commented 2 months ago

Currently, enum payloads are being evaluated when the enum is forced, but not deeply evaluated. For example:

nickel> 'Foo { bar = 1 + 2 }
'Foo { bar = 1 + 2, }

Based on the comment in operation.rs, this seems unintentional (because deep_seq does deeply evaluate the payload). This PR changes the behavior to

nickel> 'Foo { bar = 1 + 2 }
'Foo { bar = 3, }