summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-10-15 13:36:16 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-15 17:41:48 -0400
commit846fe90464a1916df4ea72659255963a596eec84 (patch)
tree4068367730bcd359b51eb94fd982d3d89041d552 /testsuite
parenta816ac48b01bfc2419c11c9f2ef999e9bda7e95f (diff)
downloadhaskell-846fe90464a1916df4ea72659255963a596eec84.tar.gz
Typeable: Only render saturated tuple types with tuple syntax
This isn't as efficient as it could be since it needs to compute the kind of the type. However, this is `show` so there shouldn't be any particular expectation of speed. Fixes #14341. Test Plan: Validate Reviewers: hvr Subscribers: monoidal, rwbarton, carter GHC Trac Issues: #14341 Differential Revision: https://phabricator.haskell.org/D5080
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_run/T14341.hs9
-rw-r--r--testsuite/tests/typecheck/should_run/T14341.stdout3
-rwxr-xr-xtestsuite/tests/typecheck/should_run/all.T1
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/T14341.hs b/testsuite/tests/typecheck/should_run/T14341.hs
new file mode 100644
index 0000000000..72d2f63b1e
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/T14341.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeApplications #-}
+
+import Type.Reflection
+
+main :: IO ()
+main = do
+ print $ typeRep @((,,))
+ print $ typeRep @((,,) Int)
+ print $ typeRep @((,,) Int Int Int)
diff --git a/testsuite/tests/typecheck/should_run/T14341.stdout b/testsuite/tests/typecheck/should_run/T14341.stdout
new file mode 100644
index 0000000000..ea3d3441a2
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/T14341.stdout
@@ -0,0 +1,3 @@
+(,,)
+(,,) Int
+(Int,Int,Int) \ No newline at end of file
diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T
index a96c2b71c5..4f75c70119 100755
--- a/testsuite/tests/typecheck/should_run/all.T
+++ b/testsuite/tests/typecheck/should_run/all.T
@@ -136,3 +136,4 @@ test('T13838', [exit_code(1), omit_ways(['ghci'])], compile_and_run, ['-fdefer-t
test('T14218', normal, compile_and_run, [''])
test('T14236', normal, compile_and_run, [''])
test('T14925', normal, compile_and_run, [''])
+test('T14341', normal, compile_and_run, [''])