@@ -367,10 +367,13 @@ corresponding to @racket[trest], where @racket[bound]
367
367
368
368
@defform[(Boxof/Read t)]{
369
369
A @rtech{box} of @racket[t] that only supports read-only operations
370
- such as @racket[unbox]. A @racket[(Boxof/Read t)] is a subtype of
371
- @racket[(Boxof t)], and a @racket[(Boxof/Read a)] is a subtype of
372
- @racket[(Boxof/Read b)] if @racket[a] is a subtype of @racket[b]. It
373
- is equivalent to @racket[(Boxof Nothing t)].}
370
+ such as @racket[unbox]. A @racket[(Boxof/Read a)] is a subtype of
371
+ @racket[(Boxof/Read b)] if @racket[a] is a subtype of @racket[b].
372
+
373
+ A @racket[(Boxof/Read t)] is a supertype of @racket[(Boxof t)], so
374
+ any @racket[(Boxof t)] can be used as a @racket[(Boxof/Read t)], but
375
+ but not the other way around. It is equivalent to
376
+ @racket[(Boxof Nothing t)].}
374
377
375
378
@ex[(box-immutable "hello world " )
376
379
(code:comment "though this does not necessarily imply immutability: " )
@@ -384,8 +387,11 @@ corresponding to @racket[trest], where @racket[bound]
384
387
@defform[(Boxof/Write t)]{
385
388
A @rtech{box} that could contain anything, but can only take
386
389
@racket[t] for write operations such as @racket[set-box!].
387
- A @racket[(Boxof/Write t)] is a supertype of @racket[(Boxof t)], and
388
- it is equivalent to @racket[(Boxof t Any)].}
390
+
391
+ A @racket[(Boxof/Write t)] is a supertype of @racket[(Boxof t)], so
392
+ a @racket[(Boxof t)] can be used as a @racket[(Boxof/Write t)], but
393
+ but not the other way around. It is equivalent to
394
+ @racket[(Boxof t Any)].}
389
395
390
396
@defidform[BoxTop]{is the type of a @rtech{box} with an unknown element
391
397
type and is the supertype of all box types. Only read-only box operations
0 commit comments