summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci046.script
blob: 28c5cde050c596f1c6025d3a0a552aa5f4f7beb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--Testing type families and their shadowing
:set -XTypeFamilies
data HTrue
data HFalse
type family AND a b
type instance AND HTrue  HTrue  = HTrue
type instance AND HTrue  HFalse = HFalse
type instance AND HFalse HTrue  = HFalse
type instance AND HFalse HFalse = HFalse
type family OR a b
type instance OR HTrue  HTrue  = HTrue
type instance OR HTrue  HFalse = HTrue
type instance OR HFalse HTrue  = HTrue
type instance OR HFalse HFalse = HFalse
:kind! AND HTrue HTrue
:kind! AND (OR HFalse HTrue) (OR HTrue HFalse)
let t = undefined :: AND HTrue HTrue
let f = undefined :: AND HTrue HFalse
type instance AND HTrue  HTrue  = HFalse
:t t
let t = undefined :: AND HTrue HTrue
:t t