summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T11416.hs
blob: 210d0423b771b10aca551b7abe6812ec7b8218af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
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