quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
148 stars 22 forks source link

Prettier breaks inline lambdas with parentheses #3110

Closed OAGr closed 4 months ago

OAGr commented 4 months ago

Description of suggestion or shortcoming:

Right now, we sometimes require lambdas to have parentheses.

withSpec = ({|f| f}) -> Tag.specification(spec)

However, the parentheses here get formatted away when formatting/prettier are applied, resulting in an error.

This is particularly useful for specification functionality, but is needed much less if this story is finished: https://github.com/quantified-uncertainty/squiggle/issues/3111