Ellie Hermaszewska
Ellie Hermaszewska
FYI I've rebased this change on the current master in my fork.
This is especially bad when default parameters span multiple lines, like here: ```nix { haskellNix ? import (builtins.fetchTarball { url = "https://github.com/vitalbio/haskell.nix/archive/06435647a5a02a2bcf20ec156894e910721c8497.tar.gz"; # vital sha256 = "190j32spzkf1cmwfsyyp996qkbfgj23blg2hwmi0xd9swj701c26"; }) { },...
> The caveat is that this interacts quite poorly with the alignment branch, as `scColumn` is indeterminate until the expression is rendered fully... Perhaps an easy solution to this is...
OK, so I did a super quick proof of concept for a "minimally invasive" aligner. It uses a fixed point over a state monad tracking a stack of maximum alignments....
Next thing to do is to make it so that, like Brittany, alignment doesn't persist over multi-line elements. So if one has the formatting code: ```haskell sep s foo (xs...
```haskell diff --git a/src/Ormolu/Printer/Meat/Declaration/Value.hs b/src/Ormolu/Printer/Meat/Declaration/Value.hs index ced5c3b..6a36288 100644 --- a/src/Ormolu/Printer/Meat/Declaration/Value.hs +++ b/src/Ormolu/Printer/Meat/Declaration/Value.hs @@ -677,8 +677,8 @@ p_hsExpr' s = \case p_if exprPlacement p_hsExpr if' then' else' HsMultiIf NoExtField guards ->...
OK, just going on the current layout seems to work well, probably a good idea to allow newlines to break alignment groups as well ```haskell do 1 _ ```
Had a look at how this would affect the next merge from ormolu, just one conflict resulting from this branch's changes so far :smile:
Right, I've updated the tests and every change seemed sensible. I think this is probably ready for an initial review (I'm sure there are still quite a few things to...
I did see that! Very exciting. No chance I'll be able to get to this before July, but I'm happy for someone else to take over before then. I'll hopefully...