dedent 'in' in 'let in'

This commit is contained in:
Domen Kožar 2018-01-28 13:08:09 +00:00
parent f867c2ccbb
commit 22097ebe1c
No known key found for this signature in database
GPG Key ID: C2FFBCAFD2C24246
1 changed files with 2 additions and 2 deletions

View File

@ -162,8 +162,8 @@ prettyNix = withoutParens . cata phi where
| "../" `isPrefixOf` txt -> txt
| otherwise -> "./" ++ txt
phi (NSym name) = simpleExpr $ text (unpack name)
phi (NLet binds body) = leastPrecedence $ group $ nest 2 $
vsep (text "let" : map prettyBind binds) <$> text "in" <+> withoutParens body
phi (NLet binds body) = leastPrecedence $ group $ text "let" <$> indent 2 (
vsep (map prettyBind binds)) <$> text "in" <+> withoutParens body
phi (NIf cond trueBody falseBody) = leastPrecedence $
group $ nest 2 $ (text "if" <+> withoutParens cond) <$>
( align (text "then" <+> withoutParens trueBody)