summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/.gitignore1
-rw-r--r--testsuite/tests/patsyn/should_run/T9783.hs15
-rw-r--r--testsuite/tests/patsyn/should_run/T9783.stdout2
-rw-r--r--testsuite/tests/patsyn/should_run/all.T1
4 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/.gitignore b/testsuite/.gitignore
index 231897c101..3a5d81654a 100644
--- a/testsuite/.gitignore
+++ b/testsuite/.gitignore
@@ -1097,6 +1097,7 @@ mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
/tests/patsyn/should_run/ex-prov
/tests/patsyn/should_run/ex-prov-run
/tests/patsyn/should_run/match
+/tests/patsyn/should_run/match-unboxed
/tests/perf/compiler/T1969.comp.stats
/tests/perf/compiler/T3064.comp.stats
/tests/perf/compiler/T3294.comp.stats
diff --git a/testsuite/tests/patsyn/should_run/T9783.hs b/testsuite/tests/patsyn/should_run/T9783.hs
new file mode 100644
index 0000000000..daef96032b
--- /dev/null
+++ b/testsuite/tests/patsyn/should_run/T9783.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE PatternSynonyms, MagicHash #-}
+module Main where
+
+import GHC.Base
+
+pattern P1 <- 0
+pattern P2 <- 1
+
+f :: Int -> Int#
+f P1 = 42#
+f P2 = 44#
+
+main = do
+ print $ I# (f 0)
+ print $ I# (f 1)
diff --git a/testsuite/tests/patsyn/should_run/T9783.stdout b/testsuite/tests/patsyn/should_run/T9783.stdout
new file mode 100644
index 0000000000..c26b130d29
--- /dev/null
+++ b/testsuite/tests/patsyn/should_run/T9783.stdout
@@ -0,0 +1,2 @@
+42
+44
diff --git a/testsuite/tests/patsyn/should_run/all.T b/testsuite/tests/patsyn/should_run/all.T
index b3c6b74461..9c3f16b0ea 100644
--- a/testsuite/tests/patsyn/should_run/all.T
+++ b/testsuite/tests/patsyn/should_run/all.T
@@ -3,3 +3,4 @@ test('match', normal, compile_and_run, [''])
test('ex-prov-run', normal, compile_and_run, [''])
test('bidir-explicit', normal, compile_and_run, [''])
test('bidir-explicit-scope', normal, compile_and_run, [''])
+test('T9783', normal, compile_and_run, [''])