File tree Expand file tree Collapse file tree 20 files changed +47
-9
lines changed
typed-racket-lib/typed-racket/static-contracts Expand file tree Collapse file tree 20 files changed +47
-9
lines changed Original file line number Diff line number Diff line change 27
27
28
28
(struct any-combinator combinator ()
29
29
#:transparent
30
+ #:authentic
30
31
#:methods gen:sc
31
32
[(define (sc-map v f) v)
32
33
(define (sc-traverse v f) (void))
Original file line number Diff line number Diff line change 24
24
25
25
(struct case-combinator combinator ()
26
26
#:transparent
27
+ #:authentic
27
28
#:property prop:combinator-name "case->/sc "
28
29
#:methods gen:sc
29
30
[(define (sc-map v f)
38
39
(struct arr-combinator combinator ()
39
40
#:transparent
40
41
#:property prop:combinator-name "arr/sc "
42
+ #:authentic
41
43
#:methods gen:sc
42
44
[(define (sc-map v f)
43
45
(arr-combinator (arr-seq-sc-map f (combinator-args v))))
83
85
84
86
85
87
(struct arr-seq (args rest range)
88
+ #:authentic
86
89
#:transparent
87
90
#:property prop:sequence
88
91
(match-lambda
Original file line number Diff line number Diff line change 15
15
[prompt-tag/sc ((listof static-contract?) (or/c (listof static-contract?) #f ) . -> . static-contract?)])
16
16
17
17
(struct prompt-tag-combinator combinator ()
18
+ #:authentic
18
19
#:transparent
19
20
#:property prop:combinator-name "prompt-tag/sc "
20
21
#:methods gen:sc
36
37
(merge-restricts* 'chaperone (map f (pt-seq->list (combinator-args v)))))])
37
38
38
39
(struct pt-seq (vals call-cc)
40
+ #:authentic
39
41
#:transparent
40
42
#:property prop:sequence
41
43
(lambda (s)
Original file line number Diff line number Diff line change 21
21
pre-deps
22
22
rng
23
23
rng-deps)
24
+ #:authentic
24
25
#:transparent
25
26
#:property prop:combinator-name "dep->/sc "
26
27
#:methods gen:sc
Original file line number Diff line number Diff line change 16
16
17
17
18
18
(struct exist-combinator combinator ()
19
+ #:authentic
19
20
#:transparent
20
21
#:methods gen:sc
21
22
[(define (sc-map v f)
Original file line number Diff line number Diff line change 23
23
static-contract?)])
24
24
25
25
(struct function-combinator combinator (indices mand-kws opt-kws typed-side?)
26
+ #:authentic
26
27
#:property prop:combinator-name "->/sc "
27
28
#:methods gen:equal+hash [(define (equal-proc a b recur) (function-sc-equal? a b recur))
28
29
(define (hash-proc v recur) (function-sc-hash v recur))
Original file line number Diff line number Diff line change 92
92
(list typed-sc untyped-sc both-sc)))
93
93
94
94
(struct name-combinator combinator (gen-name)
95
+ #:authentic
95
96
#:transparent
96
97
#:property prop:combinator-name "name/sc "
97
98
#:methods gen:sc
Original file line number Diff line number Diff line change 23
23
(display "#<none/sc> " port)))
24
24
25
25
(struct none-combinator combinator ()
26
+ #:authentic
26
27
#:transparent
27
28
#:methods gen:sc
28
29
[(define (sc-map v f) v)
Original file line number Diff line number Diff line change 13
13
typed-racket/utils/opaque-object)
14
14
(for-syntax racket/base syntax/parse))
15
15
16
- (struct member-spec (modifier id sc) #:transparent )
16
+ (struct member-spec (modifier id sc) #:authentic #: transparent )
17
17
18
18
(define field-modifiers '(field init init-field inherit-field ))
19
19
(define method-modifiers '(method inherit super inner override augment augride ))
20
20
21
21
(struct object-combinator combinator (opaque?)
22
+ #:authentic
22
23
#:transparent
23
24
#:property prop:combinator-name "object/sc "
24
25
#:methods gen:sc
34
35
(merge-restricts* 'impersonator (map f (member-seq->list (combinator-args v)))))])
35
36
36
37
(struct class-combinator combinator (opaque absents)
38
+ #:authentic
37
39
#:transparent
38
40
#:property prop:combinator-name "class/sc "
39
41
#:methods gen:sc
52
54
(merge-restricts* 'impersonator (map f (member-seq->list (combinator-args v)))))])
53
55
54
56
(struct instanceof-combinator combinator ()
57
+ #:authentic
55
58
#:transparent
56
59
#:property prop:combinator-name "instanceof/sc "
57
60
#:methods gen:sc
78
81
(filter-map member-spec-sc vals)]))
79
82
80
83
(struct member-seq (vals)
81
- #:transparent
82
- #:property prop:sequence member-seq->list)
84
+ #:authentic
85
+ #:transparent
86
+ #:property prop:sequence member-seq->list)
83
87
84
88
(define (member-seq-sc-map f seq)
85
89
(match seq
Original file line number Diff line number Diff line change 31
31
[sealing-var/sc (identifier? . -> . static-contract?)])
32
32
33
33
(struct parametric-combinator combinator (vars)
34
+ #:authentic
34
35
#:transparent
35
36
#:property prop:combinator-name "parametric->/sc "
36
37
#:methods gen:sc
66
67
67
68
;; combinator for sealing-> contracts for row polymorphism
68
69
(struct sealing-combinator combinator (vars members)
70
+ #:authentic
69
71
#:transparent
70
72
#:property prop:combinator-name "sealing->/sc "
71
73
#:methods gen:sc
You can’t perform that action at this time.
0 commit comments