unisonweb / unison

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

pretty-printed types that take one line per identifier are no good #5413

Open aryairani opened 1 month ago

aryairani commented 1 month ago

Is your feature request related to a problem? Please describe.

foo                                         : Foo -> SemispaceCache
                                                     (ServiceHash
                                                       HttpRequest
                                                       (Either
                                                         HttpResponse
                                                         (WebSocket
                                                         ->{Remote,
                                                         WebSockets} ())))
                                                     (services.Service
                                                       HttpRequest
                                                       (Either
                                                         HttpResponse
                                                         (WebSocket
                                                         ->{Remote,
                                                         WebSockets} ())))

creates pages of output for a big update

Describe the solution you'd like better wrapping somehow, like

foo : Foo -> 
        SemispaceCache 
          (ServiceHash HttpRequest (Either HttpResponse (WebSocket ->{Remote, WebSockets} ())))
          (services.Service HttpRequest (Either HttpResponse (WebSocket ->{Remote, WebSockets} ())))

A clear and concise description of what you want to happen.

Describe alternatives you've considered

Additional context

aryairani commented 1 month ago

Maybe if it's multiple lines, drop it to a new line:

abcdefg : Nat
foo     : 
  Foo -> SemispaceCache 
           (ServiceHash HttpRequest (Either HttpResponse (WebSocket ->{Remote, WebSockets} ())))
           (services.Service HttpRequest (Either HttpResponse (WebSocket ->{Remote, WebSockets} ())))