Some small improvements to signatures

I noticed that in the latest version of the docs for BSL, signatures get a mention. Thank you!

There are a couple of small pain points before I can use them, however.

  1. Could we provide a link to the list of Signatures in 1.15 from section 1.4 where they're discussed? Also, it looks like ListOf was left out of the list in section 1.15 and I think Posn should be in there, too, but isn't.

  2. Also, even if you (require 2htdp/image), you don't get signatures for Image or Color, so you can't really use signatures for functions that use these. (Maybe it would be worth it to add Mode, too? You can work around Color and Mode by using String and ignoring the symbol variations, but it is nice to get a check when you have "yellew" instead of "yellow".)

But it's almost there! Is it as easy as adding

(define Posn (signature Posn (predicate posn?)))

and similar or do you have to do the (... signature/arbitrary arbitrary-etc (predicate posn?)) that the other signatures use?

Actually, I just created a file with

#lang racket
(require lang/htdp-intermediate)

(provide Image)

(define Image (signature Image (predicate image?)))

and required it in my BSL file and it at least pretended that Image was a legal thing to use in a signature. I'll try putting together a PR.

On Mar 11, 2025, at 11:37 PM, Todd O'Bryan via Racket Discourse notifications@racket.discoursemail.com wrote that he’d "try putting together a PR.”

Thanks. That would be fantastic. — Matthias