summaryrefslogtreecommitdiff
path: root/testsuite/tests/printer/Test16236.hs
blob: 974ebd0db5b9399c8d0e9549d7429c15f4e58977 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE DataKinds, PolyKinds, TypeOperators, TypeFamilies
             , TypeApplications #-}

module DumpParsedAst where
import Data.Kind

data Peano = Zero | Succ Peano

type family Length (as :: [k]) :: Peano where
  Length (a : as) = Succ (Length as)
  Length '[]      = Zero

-- vis kind app
data T f (a :: k) = MkT (f a)

type family F1 (a :: k) (f :: k -> Type) :: Type where
  F1 @Peano a f = T @Peano f a

data family DF3 (a :: k)
data instance DF3 @(K.Type -> K.Type) b = DF3Char