Skip to content

Commit

Permalink
Format type applications of QuasiQuotes correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen committed Sep 14, 2024
1 parent 392b2bc commit c4e0c6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
* Format multiple files in parallel. [Issue
1128](https://github.com/tweag/ormolu/issues/1128).

* Correctly format type applications of `QuasiQuotes`. [Issue
1134](https://github.com/tweag/ormolu/issues/1134).

## Ormolu 0.7.7.0

* Use single-line layout for parens around single-line content. [Issue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ test x = case x of
@u
v ->
""

foo = foo @[k|bar|]
2 changes: 2 additions & 0 deletions data/examples/declaration/value/function/type-applications.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ test x = case x of
Bar
@t @u v
-> ""

foo = foo @[k|bar|]
5 changes: 0 additions & 5 deletions src/Ormolu/Printer/Meat/Declaration/Value.hs
Original file line number Diff line number Diff line change
Expand Up @@ -672,11 +672,6 @@ p_hsExpr' isApp s = \case
breakpoint
inci $ do
txt "@"
-- Insert a space when the type is represented as a TH splice to avoid
-- gluing @ and $ together.
case unLoc (hswc_body a) of
HsSpliceTy {} -> space
_ -> return ()
located (hswc_body a) p_hsType
OpApp _ x op y -> do
modFixityMap <- askModuleFixityMap
Expand Down

0 comments on commit c4e0c6f

Please sign in to comment.