summaryrefslogtreecommitdiff
path: root/testsuite/tests/quasiquotation
diff options
context:
space:
mode:
authorCale Gibbard <cgibbard@gmail.com>2020-11-09 16:11:45 -0500
committerBen Gamari <ben@smart-cactus.org>2020-12-14 13:37:09 -0500
commitc696bb2f4476e0ce4071e0d91687c1fe84405599 (patch)
treedc55fdaebbcd8dbd0c1f53c80214c2996c7f3f0a /testsuite/tests/quasiquotation
parent78580ba3f99565b0aecb25c4206718d4c8a52317 (diff)
downloadhaskell-c696bb2f4476e0ce4071e0d91687c1fe84405599.tar.gz
Implement type applications in patterns
The haddock submodule is also updated so that it understands the changes to patterns.
Diffstat (limited to 'testsuite/tests/quasiquotation')
-rw-r--r--testsuite/tests/quasiquotation/T7918A.hs2
-rw-r--r--testsuite/tests/quasiquotation/qq005/Expr.hs5
2 files changed, 3 insertions, 4 deletions
diff --git a/testsuite/tests/quasiquotation/T7918A.hs b/testsuite/tests/quasiquotation/T7918A.hs
index f20dfeef59..0792ee9d1b 100644
--- a/testsuite/tests/quasiquotation/T7918A.hs
+++ b/testsuite/tests/quasiquotation/T7918A.hs
@@ -19,7 +19,7 @@ qq = QuasiQuoter {
y = VarP (mkName "y")
in \str -> case str of
"p1" -> return $ x
- "p2" -> return $ ConP 'Just [x]
+ "p2" -> return $ ConP 'Just [] [x]
"p3" -> return $ TupP [x, y]
"p4" -> return $ y
, quoteDec = undefined
diff --git a/testsuite/tests/quasiquotation/qq005/Expr.hs b/testsuite/tests/quasiquotation/qq005/Expr.hs
index 767d906ba4..bb02666847 100644
--- a/testsuite/tests/quasiquotation/qq005/Expr.hs
+++ b/testsuite/tests/quasiquotation/qq005/Expr.hs
@@ -97,9 +97,8 @@ parseExprPat s = do loc <- location
dataToPatQ (const Nothing `extQ` antiExprPat) expr
antiExprPat :: Expr -> Maybe (Q Pat)
-antiExprPat (AntiIntExpr v) = Just $ conP (mkName "IntExpr")
- [varP (mkName v)]
-antiExprPat (AntiExpr v) = Just $ varP (mkName v)
+antiExprPat (AntiIntExpr v) = Just $ conP (mkName "IntExpr") [varP (mkName v)]
+antiExprPat (AntiExpr v) = Just $ varP (mkName v)
antiExprPat _ = Nothing
-- Copied from syb for the test