blob: 65901de66d280d86c18f47e67095dd9965ffe9c1 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
resource ParamX = open Prelude in {
---- flags optimize=noexpand ;
param
Number = Sg | Pl ;
Person = P1 | P2 | P3 ;
Degree = Posit | Compar | Superl ;
Anteriority =
Simul
| Anter --# notpresent
;
Tense =
Pres
| Past --# notpresent
| Fut --# notpresent
| Cond --# notpresent
;
param
Polarity = Pos | Neg ;
QForm = QDir | QIndir ;
-- Imperatives: True = polite, False = familiar.
ImpForm = ImpF Number Bool ;
oper
numImp : ImpForm -> Number = \i ->
case i of {
ImpF n _ => n
} ;
conjNumber : Number -> Number -> Number = \m,n ->
case m of {
Sg => n ;
_ => Pl
} ;
-- For persons, we let the latter argument win ("either you or I am absent"
-- but "either I or you are absent"). This is not quite clear.
conjPerson : Person -> Person -> Person = \_,p ->
p ;
-- To construct a record with a polarity-dependent table.
polCases : SS -> SS -> {s : Polarity => Str} = \true,false -> {
s = table {
Pos => true.s ;
Neg => false.s
}
} ;
-- To count the length of a tail in a sequence of digits, e.g. to put commas
-- as in 1,000,000.
param
DTail = T1 | T2 | T3 ;
}
|