testsuite: Add (still broken) testcase for #12447
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 21 Nov 2016 18:43:48 +0000 (13:43 -0500)
committerBen Gamari <ben@smart-cactus.org>
Mon, 21 Nov 2016 18:44:08 +0000 (13:44 -0500)
Test Plan: Validate

Reviewers: austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2703

GHC Trac Issues: #12447

testsuite/tests/ghci/scripts/T12447.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T12447.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T12447.script b/testsuite/tests/ghci/scripts/T12447.script
new file mode 100644 (file)
index 0000000..6003a43
--- /dev/null
@@ -0,0 +1,9 @@
+:set -XRankNTypes -XConstraintKinds -XTypeApplications
+
+import Data.Typeable
+
+class Deferrable p where deferEither :: proxy p -> (p => r) -> Either String r
+
+instance (Typeable a, Typeable b) => Deferrable (a ~ b) where deferEither = undefined
+
+:t deferEither @(_ ~ _)
diff --git a/testsuite/tests/ghci/scripts/T12447.stdout b/testsuite/tests/ghci/scripts/T12447.stdout
new file mode 100644 (file)
index 0000000..67bbc9b
--- /dev/null
@@ -0,0 +1,3 @@
+deferEither @(_ ~ _)
+  :: Deferrable (w2 ~ w1) =>
+     proxy (w2 ~ w1) -> (w2 ~ w1 => r) -> Either String r
index 6dcc6b7..e9a41a9 100755 (executable)
@@ -266,3 +266,4 @@ test('T12091',
      ghci_script, ['T12091.script'])
 test('T12523', normal, ghci_script, ['T12523.script'])
 test('T12024', normal, ghci_script, ['T12024.script'])
+test('T12447', expect_broken(12447), ghci_script, ['T12447.script'])