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

git at git.haskell.org git at git.haskell.org
Wed Jul 19 12:03:44 UTC 2017


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/4a6a690cc349453d43630a5bb8224c950f574875/ghc

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

commit 4a6a690cc349453d43630a5bb8224c950f574875
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.


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

4a6a690cc349453d43630a5bb8224c950f574875
 testsuite/tests/typecheck/should_fail/T11672.hs     |  9 +++++++++
 testsuite/tests/typecheck/should_fail/T11672.stderr | 21 +++++++++++++++++++++
 testsuite/tests/typecheck/should_fail/all.T         |  2 ++
 3 files changed, 32 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 cc2e4e3..83ed20a 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -448,3 +448,5 @@ test('T13821B', expect_broken(13821), backpack_typecheck_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