Skip to content

Commit 9bf4d27

Browse files
author
Ryan Ficklin
committed
Added documentation for TreeLists, and slightly changed treelist-empty? and treelist-length types
1 parent 3d4c422 commit 9bf4d27

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

typed-racket-doc/typed-racket/scribblings/reference/types.scrbl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ corresponding to @racket[trest], where @racket[bound]
352352
@deftypeconstr[(MListof t)]{Returns the type of a homogeneous @rtech{mutable list} of @racket[t].}
353353
@deftypeconstr[(MPairof t u)]{Returns the type of a @rtech{Mutable pair} of @racket[t] and @racket[u].}
354354

355+
@deftypeconstr[(TreeListof t)]{Returns the type of @rtech{treelist} of @racket[t]}
356+
355357
@deftype[MPairTop]{Is the type of a @rtech{mutable pair} with unknown
356358
element types and is the supertype of all mutable pair types.
357359
This type typically appears in programs via the combination of

typed-racket-lib/typed-racket/base-env/base-env.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,8 @@
12981298
;; Section 4.21 (TreeLists)
12991299

13001300
[treelist (-poly (a) (->* (list) a (-treelist a)))]
1301-
[treelist-empty? (-poly (a) (-> (-treelist a) B))]
1302-
[treelist-length (-poly (a) (-> (-treelist a) -Index))]
1301+
[treelist-empty? (-> (-treelist Univ) B : (-treelist (Un)))]
1302+
[treelist-length (-> (-treelist Univ) -Index)]
13031303
[treelist-member?
13041304
(-poly (a)
13051305
(cl->* ((-treelist a) a . -> . Univ)

0 commit comments

Comments
 (0)