blob: 21d3f2b4ea6fa260d5a79d831827ccb9678e9049 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{-# LANGUAGE TypeFamilies #-}
module ShouldFail where
data family C9 a b :: *
data instance C9 Int Int = C9IntInt
data instance C9 [a] Int = C9ListInt
-- must fail: conflicting
data instance C9 [Int] Int = C9ListInt2
type family D9 a b :: *
type instance D9 Int Int = Int
type instance D9 [a] Int = [a]
-- must fail: conflicting
type instance D9 [Int] Int = [Bool]
type family E9 a b :: *
type instance E9 Int Int = Int
type instance E9 [a] Int = [a]
type instance E9 [Int] Int = [Int] -- does *not* conflict!
type instance E9 b Int = b
|