Skip to content

Commit 8309914

Browse files
committed
agda ish-types
1 parent 3eaf86e commit 8309914

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/playTypes_test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,32 @@ const testIt = (p, expected_result, dict) => {
8282

8383
let allPassing = 1;
8484

85+
// notation for types with guards, constraints
86+
// type integer
87+
// any value `t-integer`
88+
// by guard
89+
// non-zero positive `t-integer|0 >|`
90+
// non-negative `t-integer|0 >=|`
91+
// even `t-integer|2 % 0 =|`
92+
// by claim
93+
// ever increasing `t-integer(++)`
94+
// ever decreasing `t-integer(--)`
95+
// ever constant `t-integer(==)`
96+
// combinations
97+
// decreasing, but ever positive `t-integer(--)|0 >|`
98+
// increasing, but ever negative `t-integer(++)|0 <|`
99+
//
100+
// types of lists
101+
// any list `t-list`
102+
// by guard
103+
// non empty `t-list|len 0 >|`
104+
// by claim
105+
// ever increasing length `t-list(++)`
106+
// constrain contents
107+
// only integers `t-list<t-integer>`
108+
// Union integers, strings `t-list<t-integer t-string>`
109+
110+
85111
// test playType dictionaries
86112
const program0 = "t-number t-string swap t-number + ";
87113
const parsedProgram0 = parse(program0);

0 commit comments

Comments
 (0)