summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2021-09-28 15:30:13 +0530
committerZubin <zubin.duggal@gmail.com>2021-11-20 17:39:25 +0000
commitbc7e9f038112496c45aeb81d1504e57acb3722c7 (patch)
treef69c0cf46a8c34f8ac00f77d59187afbf5d8444d /testsuite
parentb2933ea95273f11b05f7ff796a9646a2e912d7fc (diff)
downloadhaskell-bc7e9f038112496c45aeb81d1504e57acb3722c7.tar.gz
Use 'NonEmpty' for the fields in an 'HsProjection' (#20389)
T12545 is very inconsistently affected by this change for some reason. There is a decrease in allocations on most configurations, but an increase on validate-x86_64-linux-deb9-unreg-hadrian. Accepting it as it seems unrelated to this patch. Metric Decrease: T12545 Metric Increase: T12545
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/th/T20185.hs2
-rw-r--r--testsuite/tests/th/T20185.stdout1
2 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/th/T20185.hs b/testsuite/tests/th/T20185.hs
index a48d3fddd4..c6d4781b26 100644
--- a/testsuite/tests/th/T20185.hs
+++ b/testsuite/tests/th/T20185.hs
@@ -22,6 +22,8 @@ main = do
print i
print j
print (k x)
+ y <- [| (.foo.bar) |]
+ print y
putStrLn . pprint =<< [| x.foo.bar |]
putStrLn . pprint =<< [| (id x).foo.bar |]
putStrLn . pprint =<< [| (id (id x).foo).bar |]
diff --git a/testsuite/tests/th/T20185.stdout b/testsuite/tests/th/T20185.stdout
index 7792ee2117..c888f39fa4 100644
--- a/testsuite/tests/th/T20185.stdout
+++ b/testsuite/tests/th/T20185.stdout
@@ -1,6 +1,7 @@
1
1
1
+ProjectionE ("foo" :| ["bar"])
T20185a.x.foo.bar
(GHC.Base.id T20185a.x).foo.bar
(GHC.Base.id (GHC.Base.id T20185a.x).foo).bar