unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

Expressions following `|>` operator should appear on newlines by default #5351

Open rlmark opened 2 months ago

rlmark commented 2 months ago

Describe and demonstrate the bug

@hojberg and I have noticed a change in how terms which include the |> operator are displayed since 0.5.26.

Old display as of 0.5.25:
Screenshot 2024-09-16 at 12 38 24 PM

New display on 0.5.26: Screenshot 2024-09-16 at 12 38 36 PM

This causes some display issues for the website, where our front page shows some code examples with odd formatting. (We've since decided to deploy with the 0.5.25 executable).

Transcript: manyOperators.md

Environment (please complete the following information):

aryairani commented 2 months ago

That is unexpected...

mitchellwrosen commented 2 months ago

I bisected this (sorry laptop, you can rest now)

c8414eb9cecba34541288c089ac50a604cc9c7d1 is the first bad commit
commit c8414eb9cecba34541288c089ac50a604cc9c7d1
Author: Rúnar <runarorama@gmail.com>
Date:   Wed Aug 21 00:39:07 2024 -0400

    Simpler infix printer

 .../src/Unison/Syntax/TermPrinter.hs               | 160 ++++++++++-----------
 1 file changed, 79 insertions(+), 81 deletions(-)
aryairani commented 2 months ago

@runarorama I'm assigning you because I heard you had started on a fix already