Commit 5de0be8d authored by Ryan Scott's avatar Ryan Scott
Browse files

Add regression tests for #14904

Trac #14904 was fixed in commit
faec8d35. Let's add some tests to
ensure that it stays fixed.
parent 6742ce2d
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
module T14904a where
import Data.Kind
type family F (f :: forall a. g a) :: Type where
F (f :: forall a. g a) = Int
T14904a.hs:8:1: error:
You have written a *complete user-suppled kind signature*,
but the following variable is undetermined: k0 :: *
Perhaps add a kind signature.
Inferred kinds of user-written variables:
g :: k0 -> *
f :: forall (a :: k0). g a
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
module T14904b where
import Data.Kind
type family F f :: Type where
F ((f :: forall a. g a) :: forall a. g a) = Int
T14904b.hs:9:7: error:
• Expected kind ‘forall (a :: k1). g a’, but ‘f’ has kind ‘k0’
• In the first argument of ‘F’, namely
‘((f :: forall a. g a) :: forall a. g a)’
In the type family declaration for ‘F’
......@@ -471,3 +471,5 @@ test('T14605', normal, compile_fail, [''])
test('T14761a', normal, compile_fail, [''])
test('T14761b', normal, compile_fail, [''])
test('T14884', normal, compile_fail, [''])
test('T14904a', normal, compile_fail, [''])
test('T14904b', 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