Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
piegamesde committed Oct 11, 2023
1 parent 8d9b97f commit 579d02c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Nixfmt/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ instance Pretty Binder where
group' False $ line <> pretty l <> line <> group' True (pretty TUpdate <> hardspace <> prettyTermWide t)
-- Case 2b: LHS fits onto first line, RHS is a function application
(Operation l (Ann [] TUpdate Nothing) (Application f a)) ->
line <> (group l) <> line <> prettyApp hardline (pretty TUpdate <> hardspace) mempty hardline f a
line <> (group l) <> line <> prettyApp hardline (pretty TUpdate <> hardspace) mempty mempty f a
-- Special case `++` operations to be more compact in some cases
-- Case 1: two arguments, LHS is absorbable term, RHS fits onto the last line
(Operation (Term t) (Ann [] TConcat Nothing) b) | isAbsorbable t ->
Expand All @@ -155,7 +155,7 @@ instance Pretty Binder where
group' False $ line <> pretty l <> line <> group' True (pretty TConcat <> hardspace <> prettyTermWide t)
-- Case 2b: LHS fits onto first line, RHS is a function application
(Operation l (Ann [] TConcat Nothing) (Application f a)) ->
line <> (group l) <> line <> prettyApp hardline (pretty TConcat <> hardspace) mempty hardline f a
line <> (group l) <> line <> prettyApp hardline (pretty TConcat <> hardspace) mempty mempty f a
-- Everything else:
-- If it fits on one line, it fits
-- If it fits on one line but with a newline after the `=`, it fits (including semicolon)
Expand Down

0 comments on commit 579d02c

Please sign in to comment.