summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/rename/should_compile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-01-22 13:07:35 +0000
committerIan Lynagh <igloo@earth.li>2010-01-22 13:07:35 +0000
commitb80c6b7b841eb32c348887b014b47d2d3247e908 (patch)
tree239679fe3c44cfb4eed93aa1cc95782361e464b9 /testsuite/tests/ghc-regress/rename/should_compile
parent6ed70cea3c0607ad638f7ca37b4841b7b396c04c (diff)
downloadhaskell-b80c6b7b841eb32c348887b014b47d2d3247e908.tar.gz
Add a test for #3823
Diffstat (limited to 'testsuite/tests/ghc-regress/rename/should_compile')
-rw-r--r--testsuite/tests/ghc-regress/rename/should_compile/Makefile5
-rw-r--r--testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs8
-rw-r--r--testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs-boot5
-rw-r--r--testsuite/tests/ghc-regress/rename/should_compile/T3823B.hs8
-rw-r--r--testsuite/tests/ghc-regress/rename/should_compile/all.T6
5 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/rename/should_compile/Makefile b/testsuite/tests/ghc-regress/rename/should_compile/Makefile
index 0b0e1c87c7..f586aead53 100644
--- a/testsuite/tests/ghc-regress/rename/should_compile/Makefile
+++ b/testsuite/tests/ghc-regress/rename/should_compile/Makefile
@@ -7,3 +7,8 @@ T1792_imports:
'$(TEST_HC)' -ddump-minimal-imports -c T1792_imports.hs
cat T1792_imports.imports
+T3823:
+ $(RM) T3823A.hi-boot T3823A.hi T3823B.hi
+ $(RM) T3823A.o-boot T3823A.o T3823B.o
+ '$(TEST_HC)' -v0 --make T3823A.hs
+
diff --git a/testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs b/testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs
new file mode 100644
index 0000000000..0a5c230973
--- /dev/null
+++ b/testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs
@@ -0,0 +1,8 @@
+module T3823A where
+
+import T3823B
+
+data A = X { x :: Bool } | Y
+
+y :: A -> A
+y = \_ -> Y
diff --git a/testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs-boot b/testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs-boot
new file mode 100644
index 0000000000..3b7dd8bb17
--- /dev/null
+++ b/testsuite/tests/ghc-regress/rename/should_compile/T3823A.hs-boot
@@ -0,0 +1,5 @@
+module T3823A where
+
+data A = X { x :: Bool } | Y
+
+y :: A -> A
diff --git a/testsuite/tests/ghc-regress/rename/should_compile/T3823B.hs b/testsuite/tests/ghc-regress/rename/should_compile/T3823B.hs
new file mode 100644
index 0000000000..9f4d03e091
--- /dev/null
+++ b/testsuite/tests/ghc-regress/rename/should_compile/T3823B.hs
@@ -0,0 +1,8 @@
+module T3823B where
+
+import {-# SOURCE #-} T3823A
+
+data B = A A
+
+a = x (X True)
+b = y a
diff --git a/testsuite/tests/ghc-regress/rename/should_compile/all.T b/testsuite/tests/ghc-regress/rename/should_compile/all.T
index bd975d3ec5..2e040da73d 100644
--- a/testsuite/tests/ghc-regress/rename/should_compile/all.T
+++ b/testsuite/tests/ghc-regress/rename/should_compile/all.T
@@ -129,3 +129,9 @@ test('timing003', normal, compile, [''])
test('T1792_imports', extra_clean(['T1792_imports.imports']), run_command,
['$MAKE -s --no-print-directory T1792_imports'])
+test('T3823',
+ extra_clean(['T3823A.hi-boot', 'T3823A.hi', 'T3823B.hi',
+ 'T3823A.o-boot', 'T3823A.o', 'T3823B.o']),
+ run_command,
+ ['$MAKE -s --no-print-directory T3823'])
+