Currently,
val _ = this is an extremely long function application which must be wrapped onto additional lines due to its length
formats to
val _ =
this is an extremely long function application which must be wrapped onto
additional
lines
due
to
its
length
It feels odd that the grouping happens per application; I would expect
val _ =
this
is
an
extremely
long
function
application
which
must
be
wrapped
onto
additional
lines
due
to
its
length
since the entire nested function application can't be grouped together.
My immediate thought for a solution would be to write a simple auxiliary function which traverses the left spine of an App until it reaches a non-App, performing the group only at the top level. It would be nice if we could accomplish this without violating compositionality, though... (That said, given how common curried function application is, perhaps it wouldn't be the worst place to add a special case?)
Currently,
val _ = this is an extremely long function application which must be wrapped onto additional lines due to its lengthformats to
val _ = this is an extremely long function application which must be wrapped onto additional lines due to its lengthIt feels odd that the grouping happens per application; I would expect
val _ = this is an extremely long function application which must be wrapped onto additional lines due to its lengthsince the entire nested function application can't be grouped together.
My immediate thought for a solution would be to write a simple auxiliary function which traverses the left spine of an
Appuntil it reaches a non-App, performing thegrouponly at the top level. It would be nice if we could accomplish this without violating compositionality, though... (That said, given how common curried function application is, perhaps it wouldn't be the worst place to add a special case?)