summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T13985.hs
blob: c0555d8f69240b001997d32cd8aba225394a51cf (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
26
27
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module T13985 where

import Data.Kind
import Data.Proxy

data family Fam
data instance Fam = MkFam (forall (a :: k). Proxy a)

type family T
type instance T = Proxy (Nothing :: Maybe a)

class C k where
  data CD :: k
  type CT :: k

instance C Type where
  data CD = forall (a :: k). CD (Proxy a)
  type CT = Proxy (Nothing :: Maybe a)

class Z a where
  type ZT a
  type ZT a = Proxy (Nothing :: Maybe x)