Skip to content

Commit 80bb159

Browse files
committed
Make Typed Racket implementation structs authentic.
1 parent 460916a commit 80bb159

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

typed-racket-lib/typed-racket/rep/core-rep.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
(begin (struct name ()
7474
#:constructor-name mk
7575
#:transparent
76+
#:authentic
7677
#:property prop:custom-print-quotable 'never
7778
extra ...
7879
#:methods gen:custom-write

typed-racket-lib/typed-racket/rep/free-variance.rkt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
variance:const
4343
variance:dotted)
4444
(let ()
45-
(define-struct Variance () #:transparent)
46-
(define-struct (Covariant Variance) () #:transparent)
47-
(define-struct (Contravariant Variance) () #:transparent)
48-
(define-struct (Invariant Variance) () #:transparent)
49-
(define-struct (Constant Variance) () #:transparent)
45+
(define-struct Variance () #:transparent #:authentic)
46+
(define-struct (Covariant Variance) () #:transparent #:authentic)
47+
(define-struct (Contravariant Variance) () #:transparent #:authentic)
48+
(define-struct (Invariant Variance) () #:transparent #:authentic)
49+
(define-struct (Constant Variance) () #:transparent #:authentic)
5050
;; not really a variance, but is disjoint with the others
51-
(define-struct (Dotted Variance) () #:transparent)
51+
(define-struct (Dotted Variance) () #:transparent #:authentic)
5252
(values Variance? (make-Covariant) (make-Contravariant) (make-Invariant) (make-Constant) (make-Dotted))))
5353

5454
(define (variance:co? x) (eq? x variance:co))
@@ -74,9 +74,9 @@
7474

7575
;;All of these are used internally
7676
;;Only combined-frees is used externally
77-
(struct combined-frees (table computed) #:transparent)
78-
(struct app-frees (name args) #:transparent)
79-
(struct remove-frees (inner name) #:transparent)
77+
(struct combined-frees (table computed) #:transparent #:authentic)
78+
(struct app-frees (name args) #:transparent #:authentic)
79+
(struct remove-frees (inner name) #:transparent #:authentic)
8080

8181

8282
;; Base constructors

typed-racket-lib/typed-racket/rep/rep-utils.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@
619619
#'(constr-provide nonconstr-provide)])]
620620
[struct-def #'(struct var.name parent ... (flds.ids ...)
621621
maybe-transparent ...
622+
#:authentic
622623
#:constructor-name constructor-name
623624
#:property prop:uid uid-id
624625
#:property prop:mask rep-mask-body

0 commit comments

Comments
 (0)