Ellie Hermaszewska
Ellie Hermaszewska
Happy for you to take over this PR, all in all I think the way I implemented it here, although cool, is pretty fragile though. On Thu, Jun 2, 2022...
I bumped into something similar during my leading arrow work and made it so that comments were sensibly attached. https://github.com/fourmolu/fourmolu/blob/35dbface79d722952163e0c862951cbd6ca175fc/src/Ormolu/Printer/Meat/Type.hs#L144-L145 A workaround is to add a comment after `foo1` and...
This fixes it I believe ```haskell diff --git a/src/Ormolu/Printer/Meat/Declaration/Value.hs b/src/Ormolu/Printer/Meat/Declaration/Value.hs index 6443466..77e1597 100644 --- a/src/Ormolu/Printer/Meat/Declaration/Value.hs +++ b/src/Ormolu/Printer/Meat/Declaration/Value.hs @@ -720,7 +720,13 @@ p_hsExpr' s = \case TransStmtCtxt _ -> notImplemented "TransStmtCtxt"...
> Anyway, I've been thinking about this and it might actually be a much simpler change than I thought. To a first approximation, what we want to do is just...
> _oneVeryLongList Looks more like several short lists to me...
One of the things which I'd most value would be for fourmolu to make "obviously single line" decisions. like changing this ```haskell foo = bar baz ``` into ```haskell foo...
I quite often end up with single-line-fitting expressions after some text editor shenanigans (swapping arguments by swapping lines or some such). If it's not a huge trouble to do so...
Sure, I get that. I think as a first approximation for line-shortening would be the hack: turn on single-line mode whenever the line is shorter than `N - scColumn` columns.
Although really what needs to happen would be some speculative layouting. Capturing and resetting the state after some speculative output should be fairly easy, but care might need to be...
If I were to fix the merge conflicts would it stand a chance of getting merged?