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

import Data.Kind

type ConstantT a b = a

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

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

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