summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/Simple5.hs
blob: d8c8bb46fbdfd6c0aabca3bbdc70b742cc013f41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE TypeFamilies #-}

module ShouldCompile where

import Data.Kind (Type)

data family C9 a b :: Type
data instance C9 Int Int = C9IntInt
data instance C9 [a] Int = C9ListInt
data instance C9 [Int] [a]   = C9ListList2

type family D a
type instance D (Int, a) = (Int, a)
type instance D (a, Int) = (Int, Int)

type family E a
type instance E (Char, b) = ([Char], b)
type instance E (a, Int)  = (String, Int)