Skip to content

Commit

Permalink
Fix indentation of BinOps.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Dec 8, 2024
1 parent 942aaa3 commit c849119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

* Improvements to `futhark fmt`.

### Removed

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Futhark/Fmt/Printer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ instance Format UncheckedCase where

instance Format (AppExpBase NoInfo Name) where
fmt (BinOp (bop, _) _ (x, _) (y, _) loc) =
addComments loc $ fmt x </> fmtBinOp bop <+> fmt y
addComments loc $ align (fmt x) </> fmtBinOp bop <+> align (fmt y)
fmt (Match e cs loc) =
addComments loc $ "match" <+> fmt e </> sep line (map fmt $ toList cs)
-- need some way to omit the inital value expression, when this it's trivial
Expand Down

0 comments on commit c849119

Please sign in to comment.