summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2017-07-20 11:30:46 -0400
committerBen Gamari <ben@smart-cactus.org>2017-07-20 11:30:47 -0400
commitfdb6a5bfd545094782fb539951b561ac2467443d (patch)
tree330835eaae8d987cb96dd8bde8a1fd7926a44508 /testsuite/tests
parent194384f1318e0553e0c5ce621ca0903b55862eb3 (diff)
downloadhaskell-fdb6a5bfd545094782fb539951b561ac2467443d.tar.gz
Make IfaceAxiom typechecking lazier.
Fixes #13803, but adds a note about a yet to be fixed #13981. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #13803 Differential Revision: https://phabricator.haskell.org/D3742
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/driver/T13803/D.hs5
-rw-r--r--testsuite/tests/driver/T13803/E.hs11
-rw-r--r--testsuite/tests/driver/T13803/E.hs-boot1
-rw-r--r--testsuite/tests/driver/T13803/Makefile6
-rw-r--r--testsuite/tests/driver/T13803/T13803.stdout5
-rw-r--r--testsuite/tests/driver/T13803/Y.hs6
-rw-r--r--testsuite/tests/driver/T13803/Y.hs-boot3
-rw-r--r--testsuite/tests/driver/T13803/all.T4
8 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T13803/D.hs b/testsuite/tests/driver/T13803/D.hs
new file mode 100644
index 0000000000..839f115953
--- /dev/null
+++ b/testsuite/tests/driver/T13803/D.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE TypeFamilies #-}
+module D (D) where
+
+type family D a
+type instance D Int = Int
diff --git a/testsuite/tests/driver/T13803/E.hs b/testsuite/tests/driver/T13803/E.hs
new file mode 100644
index 0000000000..2ae1908e34
--- /dev/null
+++ b/testsuite/tests/driver/T13803/E.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+module E where
+
+import GHC.Exts (Constraint)
+import {-# SOURCE #-} Y
+
+data E
+
+type family CF a :: * -> Constraint
+type instance CF E = Y
diff --git a/testsuite/tests/driver/T13803/E.hs-boot b/testsuite/tests/driver/T13803/E.hs-boot
new file mode 100644
index 0000000000..858a5ef617
--- /dev/null
+++ b/testsuite/tests/driver/T13803/E.hs-boot
@@ -0,0 +1 @@
+module E where
diff --git a/testsuite/tests/driver/T13803/Makefile b/testsuite/tests/driver/T13803/Makefile
new file mode 100644
index 0000000000..4a18296cc2
--- /dev/null
+++ b/testsuite/tests/driver/T13803/Makefile
@@ -0,0 +1,6 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+T13803:
+ '$(TEST_HC)' $(TEST_HC_OPTS) --make Y.hs
diff --git a/testsuite/tests/driver/T13803/T13803.stdout b/testsuite/tests/driver/T13803/T13803.stdout
new file mode 100644
index 0000000000..bab4a55099
--- /dev/null
+++ b/testsuite/tests/driver/T13803/T13803.stdout
@@ -0,0 +1,5 @@
+[1 of 5] Compiling D ( D.hs, D.o )
+[2 of 5] Compiling E[boot] ( E.hs-boot, E.o-boot )
+[3 of 5] Compiling Y[boot] ( Y.hs-boot, Y.o-boot )
+[4 of 5] Compiling E ( E.hs, E.o )
+[5 of 5] Compiling Y ( Y.hs, Y.o )
diff --git a/testsuite/tests/driver/T13803/Y.hs b/testsuite/tests/driver/T13803/Y.hs
new file mode 100644
index 0000000000..c1bf116b0b
--- /dev/null
+++ b/testsuite/tests/driver/T13803/Y.hs
@@ -0,0 +1,6 @@
+module Y where
+
+import D ()
+import {-# SOURCE #-} E
+
+class Y o
diff --git a/testsuite/tests/driver/T13803/Y.hs-boot b/testsuite/tests/driver/T13803/Y.hs-boot
new file mode 100644
index 0000000000..42737ccb93
--- /dev/null
+++ b/testsuite/tests/driver/T13803/Y.hs-boot
@@ -0,0 +1,3 @@
+module Y where
+
+class Y o
diff --git a/testsuite/tests/driver/T13803/all.T b/testsuite/tests/driver/T13803/all.T
new file mode 100644
index 0000000000..bfd720cae9
--- /dev/null
+++ b/testsuite/tests/driver/T13803/all.T
@@ -0,0 +1,4 @@
+test('T13803',
+ [extra_files(['D.hs', 'E.hs-boot', 'E.hs', 'Y.hs', 'Y.hs-boot'])],
+ run_command,
+ ['$MAKE -s --no-print-directory T13803'])