[commit: ghc] ghc-8.2: Test #11672 in typecheck/should_fail/T11672. (7172409)

git at git.haskell.org git at git.haskell.org
Tue Sep 19 21:10:19 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/717240921c440852b748cc26c60142243c51e4d1/ghc

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

commit 717240921c440852b748cc26c60142243c51e4d1
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date:   Thu Jun 1 18:28:57 2017 -0400

    Test #11672 in typecheck/should_fail/T11672.
    
    I believe this was fixed with the fix for #11198.
    
    (cherry picked from commit 9a54975665f23df8c8137da24028a5aec4c77fba)


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

717240921c440852b748cc26c60142243c51e4d1
 testsuite/tests/typecheck/should_fail/T11672.hs     | 9 +++++++++
 testsuite/tests/typecheck/should_fail/T11672.stderr | 9 +++++++++
 testsuite/tests/typecheck/should_fail/all.T         | 2 ++
 3 files changed, 20 insertions(+)

diff --git a/testsuite/tests/typecheck/should_fail/T11672.hs b/testsuite/tests/typecheck/should_fail/T11672.hs
new file mode 100644
index 0000000..8c5e2fb
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11672.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE KindSignatures #-}
+module BadError where
+
+import GHC.TypeLits
+import Data.Proxy
+
+f :: Proxy (a :: Symbol) -> Int
+f _ = f (Proxy :: Proxy (Int -> Bool))
diff --git a/testsuite/tests/typecheck/should_fail/T11672.stderr b/testsuite/tests/typecheck/should_fail/T11672.stderr
new file mode 100644
index 0000000..47e1835
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11672.stderr
@@ -0,0 +1,9 @@
+
+T11672.hs:9:10: error:
+    • Couldn't match type ‘*’ with ‘Symbol’
+      Expected type: Proxy a0
+        Actual type: Proxy (Int -> Bool)
+    • In the first argument of ‘f’, namely
+        ‘(Proxy :: Proxy (Int -> Bool))’
+      In the expression: f (Proxy :: Proxy (Int -> Bool))
+      In an equation for ‘f’: f _ = f (Proxy :: Proxy (Int -> Bool))
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 3deba22..0d950f5 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -439,3 +439,5 @@ test('T14000', normal, compile_fail, [''])
 test('T13530', normal, compile_fail, [''])
 test('T12373', normal, compile_fail, [''])
 test('T13610', normal, compile_fail, [''])
+test('T11672', normal, compile_fail, [''])
+



More information about the ghc-commits mailing list