summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T13887.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-07-29 19:36:42 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2017-07-29 19:36:42 -0400
commit7089dc2f12f9616771fc1de143e9b974157405d8 (patch)
tree386a5bebf509ffb04ef8b91a34d1214e59bee441 /testsuite/tests/th/T13887.hs
parentf839b9de18a9f795e438314bea9f17e594afa354 (diff)
downloadhaskell-7089dc2f12f9616771fc1de143e9b974157405d8.tar.gz
Follow-up to #13887, for promoted infix constructors
Summary: Correct a couple more spots in the TH pretty-printer by applying the appropriate parenthesization for infix names. Fixes #13887 (again). Test Plan: make test TEST=T13887 Reviewers: austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13887 Differential Revision: https://phabricator.haskell.org/D3802
Diffstat (limited to 'testsuite/tests/th/T13887.hs')
-rw-r--r--testsuite/tests/th/T13887.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/th/T13887.hs b/testsuite/tests/th/T13887.hs
new file mode 100644
index 0000000000..8687447d16
--- /dev/null
+++ b/testsuite/tests/th/T13887.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE TemplateHaskell #-}
+module Main where
+
+import Data.Proxy
+import GHC.Generics
+import Language.Haskell.TH
+
+main :: IO ()
+main = do
+ putStrLn $([t| Proxy (:*:) |] >>= stringE . pprint)
+ putStrLn $([t| Proxy '(:*:) |] >>= stringE . pprint)
+ putStrLn $([t| Proxy '(:) |] >>= stringE . pprint)