Skip to content

Commit 1466261

Browse files
amesgenmrkkrp
authored andcommitted
Format type applications of QuasiQuotes correctly
1 parent 1f6873c commit 1466261

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* Format multiple files in parallel. [Issue
44
1128](https://github.com/tweag/ormolu/issues/1128).
55

6+
* Correctly format type applications of `QuasiQuotes`. [Issue
7+
1134](https://github.com/tweag/ormolu/issues/1134).
8+
69
## Ormolu 0.7.7.0
710

811
* Use single-line layout for parens around single-line content. [Issue

data/examples/declaration/value/function/type-applications-out.hs

+2
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ test x = case x of
2222
@u
2323
v ->
2424
""
25+
26+
foo = foo @[k|bar|]

data/examples/declaration/value/function/type-applications.hs

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ test x = case x of
1717
Bar
1818
@t @u v
1919
-> ""
20+
21+
foo = foo @[k|bar|]

src/Ormolu/Printer/Meat/Declaration/Value.hs

-5
Original file line numberDiff line numberDiff line change
@@ -672,11 +672,6 @@ p_hsExpr' isApp s = \case
672672
breakpoint
673673
inci $ do
674674
txt "@"
675-
-- Insert a space when the type is represented as a TH splice to avoid
676-
-- gluing @ and $ together.
677-
case unLoc (hswc_body a) of
678-
HsSpliceTy {} -> space
679-
_ -> return ()
680675
located (hswc_body a) p_hsType
681676
OpApp _ x op y -> do
682677
modFixityMap <- askModuleFixityMap

0 commit comments

Comments
 (0)