[commit: ghc] master: testsuite: Add (still broken) testcase for #12447 (b98dbdf)

git at git.haskell.org git at git.haskell.org
Mon Nov 21 19:22:23 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b98dbdf667744c288f03525d5e012563d31143ce/ghc

>---------------------------------------------------------------

commit b98dbdf667744c288f03525d5e012563d31143ce
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Nov 21 13:43:48 2016 -0500

    testsuite: Add (still broken) testcase for #12447
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2703
    
    GHC Trac Issues: #12447


>---------------------------------------------------------------

b98dbdf667744c288f03525d5e012563d31143ce
 testsuite/tests/ghci/scripts/T12447.script | 9 +++++++++
 testsuite/tests/ghci/scripts/T12447.stdout | 3 +++
 testsuite/tests/ghci/scripts/all.T         | 1 +
 3 files changed, 13 insertions(+)

diff --git a/testsuite/tests/ghci/scripts/T12447.script b/testsuite/tests/ghci/scripts/T12447.script
new file mode 100644
index 0000000..6003a43
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12447.script
@@ -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
index 0000000..67bbc9b
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12447.stdout
@@ -0,0 +1,3 @@
+deferEither @(_ ~ _)
+  :: Deferrable (w2 ~ w1) =>
+     proxy (w2 ~ w1) -> (w2 ~ w1 => r) -> Either String r
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 6dcc6b7..e9a41a9 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -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'])



More information about the ghc-commits mailing list