blob: 8b7e62f1a5868f4114c481ef2bdc63a713b20caf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
(.using
[library
[lux "*"
["_" test {"+" Test}]
[abstract
[monad {"+" do}]]
[math
["[0]" random {"+" Random}]]]]
[\\library
["[0]" /
["/[1]" // "_"
["[1][0]" check]]]])
(type: Super
(Ex (_ sub) [Text sub]))
(type: Sub
(Super Bit))
(def: .public test
Test
(<| (_.covering /._)
(all _.and
(_.coverage [/.Co]
(and (//check.subsumes? (type (/.Co Super)) (type (/.Co Sub)))
(not (//check.subsumes? (type (/.Co Sub)) (type (/.Co Super))))))
(_.coverage [/.Contra]
(and (//check.subsumes? (type (/.Contra Sub)) (type (/.Contra Super)))
(not (//check.subsumes? (type (/.Contra Super)) (type (/.Contra Sub))))))
(_.coverage [/.In]
(and (//check.subsumes? (type (/.In Super)) (type (/.In Super)))
(//check.subsumes? (type (/.In Sub)) (type (/.In Sub)))
(not (//check.subsumes? (type (/.In Sub)) (type (/.In Super))))
(not (//check.subsumes? (type (/.In Super)) (type (/.In Sub))))))
)))
|