blob: 14b0b94047a1d2a730f985cdde235606d1aff497 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{-# OPTIONS_GHC -Wmissing-role-annotations #-}
{-# LANGUAGE RoleAnnotations #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE StandaloneKindSignatures #-}
module T22702a where
import Data.Kind (Type)
-- type with parameters
-- warns
type Foo :: Type -> Type -> Type
data Foo x y = Foo x
-- type without parameters
-- doesn't warn
data Quu = Quu1 | Quu2
-- polykinded type
-- warns, no role for `k`
type Bar :: (k -> Type) -> k -> Type
data Bar f a = Bar (f a)
-- type-class may have roles as well
-- doesn't warn
class C a where
|