Skip to content

Commit

Permalink
Very minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
georgefst committed Aug 23, 2020
1 parent e05d071 commit 389190a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/Pretty/Simple/Internal/OutputPrinter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ layoutString opts =
annotateStyle opts
. layoutSmart defaultLayoutOptions
{layoutPageWidth = AvailablePerLine (outputOptionsPageWidth opts) 1}
. indent (outputOptionsInitialIndent opts)
. prettyExprs' opts
. preprocess opts
. expressionParse
Expand All @@ -209,8 +210,7 @@ layoutString opts =
prettyExprs' :: OutputOptions -> [Expr] -> Doc Annotation
prettyExprs' opts = \case
[] -> mempty
x : xs -> indent (outputOptionsInitialIndent opts)
$ prettyExpr opts x <> prettyExprs opts xs
x : xs -> prettyExpr opts x <> prettyExprs opts xs

-- | Construct a 'Doc' from multiple 'Expr's.
prettyExprs :: OutputOptions -> [Expr] -> Doc Annotation
Expand Down

0 comments on commit 389190a

Please sign in to comment.