1
1
mirror of https://github.com/google/ormolu.git synced 2024-11-27 13:13:23 +03:00

Use ‘sitcc’ around let-in construction

Due to the “weird” leading space before ‘in’ we get rather unpleasing
results without ‘sitcc’.
This commit is contained in:
mrkkrp 2019-08-27 18:28:49 +02:00
parent 96390b2405
commit 8485e34ec7
No known key found for this signature in database
GPG Key ID: 8564658B2889FF7C
3 changed files with 10 additions and 1 deletions

View File

@ -21,3 +21,8 @@ implicitParams :: HasCallStack => Int
implicitParams =
let ?cs = ?callstack
in foo cs
sitting =
foo
$ let x = 20
in x

View File

@ -21,3 +21,7 @@ implicitParams :: HasCallStack => Int
implicitParams =
let ?cs = ?callstack
in foo cs
sitting =
foo $ let x = 20
in x

View File

@ -578,7 +578,7 @@ p_hsExpr = \case
txt "if"
breakpoint
inci . sitcc $ sep newline (located' (p_grhs RightArrow)) guards
HsLet NoExt localBinds e -> do
HsLet NoExt localBinds e -> sitcc $ do
txt "let"
space
dontUseBraces $ sitcc (located localBinds p_hsLocalBinds)