summaryrefslogtreecommitdiff
path: root/testsuite/tests/module
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/module')
-rw-r--r--testsuite/tests/module/T20562.hs15
-rw-r--r--testsuite/tests/module/all.T1
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/module/T20562.hs b/testsuite/tests/module/T20562.hs
new file mode 100644
index 0000000000..352be5e9e2
--- /dev/null
+++ b/testsuite/tests/module/T20562.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE PatternSynonyms #-}
+module Main (main) where
+
+import GHC.Tuple
+
+type OneTuple = Solo
+
+only :: OneTuple a -> a
+only = getSolo
+
+pattern OneTuple :: a -> Solo a
+pattern OneTuple a = Solo a
+
+main :: IO ()
+main = print (only (OneTuple 'x'))
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index 4a2aacc26f..212d9ecbb7 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -292,3 +292,4 @@ test('T13528', normal, compile, [''])
test('T13622', normal, compile, [''])
test('T13704a', normal, compile, ['-main-is Main.program'])
test('T13704b', [], multimod_compile, ['T13704b1.hs T13704b2.hs', '-main-is T13704b2.program -v0'])
+test('T20562', normal, compile, [''])