[commit: ghc] master: Test #11672 in typecheck/should_fail/T11672. (9a54975)
git at git.haskell.org
git at git.haskell.org
Thu Jul 27 11:49:52 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9a54975665f23df8c8137da24028a5aec4c77fba/ghc
>---------------------------------------------------------------
commit 9a54975665f23df8c8137da24028a5aec4c77fba
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.
>---------------------------------------------------------------
9a54975665f23df8c8137da24028a5aec4c77fba
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 06789ed..4a1d748 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -449,3 +449,5 @@ test('T13983', 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