@@ -1259,21 +1259,24 @@ p_exprOpTree isDollarSpecial s (OpBranch x op y) = do
12591259 gotDollar = case getOpName (unLoc op) of
12601260 Just rname -> mkVarOcc "$" == (rdrNameOcc rname)
12611261 _ -> False
1262− switchLayout [opTreeLoc x]
1263− $ ub
1264− $ p_exprOpTree (not gotDollar) s x
1262+ lhs =
1263+ switchLayout [opTreeLoc x] $
1264+ p_exprOpTree (not gotDollar) s x
12651265 let p_op = located op (opWrapper . p_hsExpr)
12661266 p_y = switchLayout [opTreeLoc y] (p_exprOpTree True N y)
12671267 if isDollarSpecial && gotDollar && placement == Normal && isOneLineSpan (opTreeLoc x)
12681268 then do
1269+ useBraces lhs
12691270 space
12701271 p_op
12711272 breakpoint
12721273 inci p_y
1273− else placeHanging placement $ do
1274− p_op
1275− space
1276− p_y
1274+ else do
1275+ ub lhs
1276+ placeHanging placement $ do
1277+ p_op
1278+ space
1279+ p_y
12771280
12781281-- | Get annotations for the enclosing element.
12791282getEnclosingAnns :: R [AnnKeywordId]