[commit: ghc] wip/rae: Test #11672 in typecheck/should_fail/T11672. (0ab271d)

git at git.haskell.org git at git.haskell.org
Tue Jul 18 18:36:50 UTC 2017


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/0ab271ddb85773d4fb394e41f606d997d823fc22/ghc

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

commit 0ab271ddb85773d4fb394e41f606d997d823fc22
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.


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

0ab271ddb85773d4fb394e41f606d997d823fc22
 testsuite/tests/typecheck/should_fail/T11672.hs     |  9 +++++++++
 testsuite/tests/typecheck/should_fail/T11672.stderr | 21 +++++++++++++++++++++
 testsuite/tests/typecheck/should_fail/all.T         |  1 +
 3 files changed, 31 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..d08acba
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11672.stderr
@@ -0,0 +1,21 @@
+
+T11672.hs:9:10: error:
+    • Couldn't match kind ‘Symbol’ with ‘*’
+      When matching types
+        a0 :: Symbol
+        Int -> Bool :: *
+      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))
+
+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 d5cfc8a..7447783 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -445,3 +445,4 @@ test('T13677', 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