summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T7020.hs
blob: 9143583563fce824405f2ce89a3f10545253eb11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE KindSignatures, RankNTypes, PolyKinds, GADTs,
              FlexibleContexts, DataKinds, TypeFamilies #-}

module T7020 where

import GHC.Exts

data family Sing (a :: k)

class SingKind (Any :: k) => SingI (s :: k) where
   sing :: Sing s

data SingInstance (a :: k) where
   SingInstance :: SingI a => SingInstance a

class (b ~ Any) => SingKind (b :: k) where
   singInstance :: forall (a :: k). Sing a -> SingInstance a