summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T11416.hs
blob: 4ad68f5bac27db93a1ed902503c602eeeaa16cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
module T11416 where

import Data.Kind

type ConstantT a b = a

newtype T f (a :: ConstantT Type f) = T (f a)
  deriving Functor

data family TFam1 (f :: k1) (a :: k2)
newtype instance TFam1 (f :: k -> Type) (ConstantT (a :: k) f)
                 = TFam1 (f a)
  deriving Functor

data family TFam2 (f :: k1) (a :: k2)
newtype instance TFam2 (f :: Type -> Type) (a :: ConstantT Type f)
                 = TFam2 (f a)
  deriving Functor