Just to be clear, I *think* layout rules don't apply here at all, actually.
If I understand correctly, "layout" has to do with turning spacing into braces and semicolons. A new line is a semicolon. A brace group is inserted around things that are aligned where a brace group actually makes sense.
e.g.
let x = y
y = z
in ...
gets turned into roughly
let { x = y
; y = z
} in ...
if-then-else however is just an expression, like a ternary operator, so it doesn't need any semicolons or braces. So layout is unrelated, except for the issue of `do` blocks inserting semicolons into `if-then-else` groups (and that's what DoAndIfThenElse fixes).
-- Andrew
PS. I am very glad someone is working on ghc-exactprint. It's a really important step in developing better Haskell tooling, imho. Doing that sort of thing right now with haskell-src-exts right now is a real pain (see half of the closed issues on hindent... about how it doesn't preserve formatting in many places.)