You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a couple of cases where elm-format has reformatted if expressions in a way that makes the logic less clear. For example, today I wanted to write some code that classified an angle as 'small positive', 'large positive', 'small negative' or 'large negative'. I tried to write it like this:
sweptAngle =if arcSweptAngle >=0thenif arcSweptAngle <= pi thenEllipticalArc2d.smallPositive
elseEllipticalArc2d.largePositive
else if arcSweptAngle >=-pi thenEllipticalArc2d.smallNegative
elseEllipticalArc2d.largeNegative
which obscures the symmetry between the positive and negative angle branches. Similar to how elm-format allows the user to decide whether to keep lists/function arguments all on one line or break them over multiple lines, would it be possible in this case to let the user decide whether if expressions should be nested or chained?
The text was updated successfully, but these errors were encountered:
I've run into a couple of cases where
elm-format
has reformattedif
expressions in a way that makes the logic less clear. For example, today I wanted to write some code that classified an angle as 'small positive', 'large positive', 'small negative' or 'large negative'. I tried to write it like this:but
elm-format
changed it towhich obscures the symmetry between the positive and negative angle branches. Similar to how
elm-format
allows the user to decide whether to keep lists/function arguments all on one line or break them over multiple lines, would it be possible in this case to let the user decide whetherif
expressions should be nested or chained?The text was updated successfully, but these errors were encountered: