Ask questionsLayout is sometimes indented less than the line of the layout trigger
Ormolu currently formats this way:
foo | x <- 5 = case x of 5 -> True _ -> False
The combination of the extra indent from wrapping the guard, and the case layout to the left of that indent, is very difficult to read. Lots of options would be better, including:
=, so that this doesn't arise in the first place.
I don't have strong preference between the two, but the current behavior was a real WTF moment.
Answer questions cdsmith
I don't recall the exact original input. Obviously
x was a much longer pattern (hence the newline), and the case branches were indented further. Something like this:
foo | Some (Really Long (Pattern x) Goes Here) <- someOther really long expression goes here = case x of 5 -> True _ -> False
Related questionsNo questions were found.