summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/numeric/should_compile/T7881.hs34
-rw-r--r--testsuite/tests/numeric/should_compile/T7881.stderr6
-rw-r--r--testsuite/tests/numeric/should_compile/all.T1
3 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_compile/T7881.hs b/testsuite/tests/numeric/should_compile/T7881.hs
new file mode 100644
index 0000000000..73d8452cc7
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T7881.hs
@@ -0,0 +1,34 @@
+
+module T7881 where
+
+import Data.Int
+
+x1 :: [Int8]
+x1 = [5 .. 3]
+
+x2 :: [Int8]
+x2 = [3 .. 5]
+
+x3 :: [Int8]
+x3 = [5, 3 .. 1]
+
+x4 :: [Int8]
+x4 = [5, (3+0) .. 1]
+
+x5 :: [Int8]
+x5 = [1, 3 .. 5]
+
+x6 :: [Int8]
+x6 = [1, (3+0) .. 5]
+
+x7 :: [Int8]
+x7 = [5, 7 .. 1]
+
+x8 :: [Int8]
+x8 = [5, (7+0) .. 1]
+
+x9 :: [Int8]
+x9 = [3, 1 .. 5]
+
+x10 :: [Int8]
+x10 = [3, (1+0) .. 5]
diff --git a/testsuite/tests/numeric/should_compile/T7881.stderr b/testsuite/tests/numeric/should_compile/T7881.stderr
new file mode 100644
index 0000000000..db1dbed796
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T7881.stderr
@@ -0,0 +1,6 @@
+
+T7881.hs:7:6: Warning: Enumeration is empty
+
+T7881.hs:25:6: Warning: Enumeration is empty
+
+T7881.hs:31:6: Warning: Enumeration is empty
diff --git a/testsuite/tests/numeric/should_compile/all.T b/testsuite/tests/numeric/should_compile/all.T
index 27a92422f5..01071c93e6 100644
--- a/testsuite/tests/numeric/should_compile/all.T
+++ b/testsuite/tests/numeric/should_compile/all.T
@@ -1,2 +1,3 @@
test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
test('T7895', normal, compile, [''])
+test('T7881', normal, compile, [''])