Commit 2d9be8cb authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #8616

parent 9c91a24a
{-# LANGUAGE PolyKinds, RankNTypes, ScopedTypeVariables #-}
module T8616 where
import Data.Proxy
import GHC.Exts
withSomeSing :: forall (kproxy :: k). Proxy kproxy
withSomeSing = undefined :: (Any :: k)
-- The 'k' is bought into scope by the type signature
-- This is a type error, but should not crash GHC
foo = (undefined :: Proxy (a :: k)) :: forall (a :: k). Proxy a
-- Again, the 'k' is bought into scope by the type signature
-- No type error though
\ No newline at end of file
T8616.hs:8:29:
Expected a type, but ‛Any’ has kind ‛k’
In an expression type signature: (Any :: k)
In the expression: undefined :: (Any :: k)
In an equation for ‛withSomeSing’:
withSomeSing = undefined :: (Any :: k)
......@@ -95,3 +95,4 @@ test('T8391', normal, compile, [''])
test('T8449', normal, run_command, ['$MAKE -s --no-print-directory T8449'])
test('T8534', normal, compile, [''])
test('T8566', normal, compile_fail,[''])
test('T8616', normal, compile_fail,[''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment