summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/ghci/scripts/T5417.hs10
-rw-r--r--testsuite/tests/ghci/scripts/T5417.script3
-rw-r--r--testsuite/tests/ghci/scripts/T5417.stdout8
-rw-r--r--testsuite/tests/ghci/scripts/T5417a.hs5
-rw-r--r--testsuite/tests/ghci/scripts/all.T1
5 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T5417.hs b/testsuite/tests/ghci/scripts/T5417.hs
new file mode 100644
index 0000000000..e86c076637
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T5417.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeFamilies #-}
+module T5417 where
+ import qualified T5417a as C
+
+ data B1 a = B1 a
+
+ instance C.C1 (B1 a) where
+ data F (B1 a) = B2 a
+
+ data family D a
diff --git a/testsuite/tests/ghci/scripts/T5417.script b/testsuite/tests/ghci/scripts/T5417.script
new file mode 100644
index 0000000000..d163d7df04
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T5417.script
@@ -0,0 +1,3 @@
+:l T5417
+:browse
+:info C.F
diff --git a/testsuite/tests/ghci/scripts/T5417.stdout b/testsuite/tests/ghci/scripts/T5417.stdout
new file mode 100644
index 0000000000..1c0506c622
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T5417.stdout
@@ -0,0 +1,8 @@
+data B1 a = B1 a
+data instance C.F (B1 a) = B2 a
+data family D a
+class C.C1 a where
+ data family C.F a
+class C.C1 a where
+ data family C.F a
+ -- Defined at T5417a.hs:5:10
diff --git a/testsuite/tests/ghci/scripts/T5417a.hs b/testsuite/tests/ghci/scripts/T5417a.hs
new file mode 100644
index 0000000000..8143023e9e
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T5417a.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE TypeFamilies #-}
+module T5417a where
+
+ class C1 a where
+ data F a :: *
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index f3ddbffc6a..5be5582df0 100644
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -75,3 +75,4 @@ test('T4316', reqlib('mtl'), ghci_script, ['T4316.script'])
test('T4832', normal, ghci_script, ['T4832.script'])
test('T5045', normal, ghci_script, ['T5045.script'])
test('T5130', normal, ghci_script, ['T5130.script'])
+test('T5417', normal, ghci_script, ['T5417.script'])