summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/driver/T8184/A.hs5
-rw-r--r--testsuite/tests/driver/T8184/B.hs8
-rw-r--r--testsuite/tests/driver/T8184/B.hs-boot3
-rw-r--r--testsuite/tests/driver/T8184/C.hs7
-rw-r--r--testsuite/tests/driver/T8184/Makefile11
-rw-r--r--testsuite/tests/driver/T8184/all.T2
6 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T8184/A.hs b/testsuite/tests/driver/T8184/A.hs
new file mode 100644
index 0000000000..93a6081c1b
--- /dev/null
+++ b/testsuite/tests/driver/T8184/A.hs
@@ -0,0 +1,5 @@
+module A where
+
+import {-# SOURCE #-} B
+
+data X = X Y
diff --git a/testsuite/tests/driver/T8184/B.hs b/testsuite/tests/driver/T8184/B.hs
new file mode 100644
index 0000000000..79732ed158
--- /dev/null
+++ b/testsuite/tests/driver/T8184/B.hs
@@ -0,0 +1,8 @@
+module B where
+
+import A
+
+data Y = Y Int Int
+
+thing :: X -> a
+thing (X (Y a b)) = thing (X (Y a b))
diff --git a/testsuite/tests/driver/T8184/B.hs-boot b/testsuite/tests/driver/T8184/B.hs-boot
new file mode 100644
index 0000000000..448783f30a
--- /dev/null
+++ b/testsuite/tests/driver/T8184/B.hs-boot
@@ -0,0 +1,3 @@
+module B where
+
+data Y
diff --git a/testsuite/tests/driver/T8184/C.hs b/testsuite/tests/driver/T8184/C.hs
new file mode 100644
index 0000000000..97c41a64bd
--- /dev/null
+++ b/testsuite/tests/driver/T8184/C.hs
@@ -0,0 +1,7 @@
+module C where
+
+import A
+import B
+
+panic :: Int -> a
+panic x = thing (X (Y x x))
diff --git a/testsuite/tests/driver/T8184/Makefile b/testsuite/tests/driver/T8184/Makefile
new file mode 100644
index 0000000000..faa4766ef1
--- /dev/null
+++ b/testsuite/tests/driver/T8184/Makefile
@@ -0,0 +1,11 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+.PHONY: clean T8184
+
+clean:
+ $(RM) *.o *.hi *.hi-boot *.o-boot
+
+T8184: clean
+ "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -O2 C.hs
diff --git a/testsuite/tests/driver/T8184/all.T b/testsuite/tests/driver/T8184/all.T
new file mode 100644
index 0000000000..ec859bfc7c
--- /dev/null
+++ b/testsuite/tests/driver/T8184/all.T
@@ -0,0 +1,2 @@
+test('T8184', normal, run_command,
+ ['$MAKE -s --no-print-directory T8184'])