summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/lib/integer/all.T1
-rw-r--r--testsuite/tests/lib/integer/bignumMatch.hs9
-rw-r--r--testsuite/tests/lib/integer/bignumMatch.stderr2
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/lib/integer/all.T b/testsuite/tests/lib/integer/all.T
index 43bcb0f3e4..fc6b77f6fa 100644
--- a/testsuite/tests/lib/integer/all.T
+++ b/testsuite/tests/lib/integer/all.T
@@ -10,6 +10,7 @@ test('gcdeInteger', normal, compile_and_run, [''])
test('integerPowMod', [], compile_and_run, [''])
test('integerGcdExt', [], compile_and_run, [''])
test('integerRecipMod', [], compile_and_run, [''])
+test('bignumMatch', [], compile, [''])
# skip ghci as it doesn't support unboxed tuples
test('integerImportExport', [omit_ways(['ghci'])], compile_and_run, [''])
diff --git a/testsuite/tests/lib/integer/bignumMatch.hs b/testsuite/tests/lib/integer/bignumMatch.hs
new file mode 100644
index 0000000000..5d9df14c27
--- /dev/null
+++ b/testsuite/tests/lib/integer/bignumMatch.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE MagicHash #-}
+{-# OPTIONS_GHC -ddump-rule-firings -O0 -v0 #-}
+
+module Test where
+
+import GHC.Num.Integer
+
+foo :: Integer
+foo = IS 45# `integerAdd` (IS 0# `integerMul` IS 18#)
diff --git a/testsuite/tests/lib/integer/bignumMatch.stderr b/testsuite/tests/lib/integer/bignumMatch.stderr
new file mode 100644
index 0000000000..d2a5a07dcb
--- /dev/null
+++ b/testsuite/tests/lib/integer/bignumMatch.stderr
@@ -0,0 +1,2 @@
+Rule fired: integerMul (BUILTIN)
+Rule fired: integerAdd (BUILTIN)