on master help sign in
Add space after minus for ‘NegApp’
0065a9bsphaso
data/examples/declaration/value/function/negation-out.hs+6
@@ -1,2 +1,8 @@
1foo :: Int
1foo :: Int
2foo = (-2)
2foo = (-2)
3+
4+bar :: Int
5+bar = -2
6+
7+baz :: Int
8+baz = - 2
data/examples/declaration/value/function/negation.hs+6
@@ -1,2 +1,8 @@
1foo :: Int
1foo :: Int
2foo = (-2)
2foo = (-2)
3+
4+bar :: Int
5+bar = -2
6+
7+baz :: Int
8+baz = - 2
src/Ormolu/Printer/Meat/Declaration/Value.hs+1−1
@@ -456,7 +456,7 @@ p_hsExpr = \case
456 placeHanging (exprPlacement (unLoc y)) $
456 placeHanging (exprPlacement (unLoc y)) $
457 located y p_hsExpr
457 located y p_hsExpr
458 NegApp NoExt e _ -> do
458 NegApp NoExt e _ -> do
459− txt "-"
459+ txt "- "
460 located e p_hsExpr
460 located e p_hsExpr
461 HsPar NoExt e -> parens (located e p_hsExpr)
461 HsPar NoExt e -> parens (located e p_hsExpr)
462 SectionL NoExt x op -> do
462 SectionL NoExt x op -> do