@deftype and @defpolytype for Scribble

Hello,

While writing Scribble docs for my Typed Racket code, I ended up with the following macros:

@(define-syntax-rule (defpolytype . args)
  (defform #:kind "polymorphic type" . args))

@(define-syntax-rule (deftype . args)
  (defidform #:kind "type" . args))

Am I missing some existing definitions in Scribble?

If not, would it be interesting to add these definitions? I am willing to make a PR if people think it makes sense.

I don't think there are built-in deftype and defpolytype in scribble. After all, scribble speaks no types :stuck_out_tongue: .

IIUC, there is a deftype defined for the TR scribble docs.

1 Like

Thank you @capfredf, I'll make my definitions the same as in Typed Racket to make things uniform.

In my opinion, it may be relevant to add some of these definitions to Scribble, but I am clearly biased and I have no idea whether it is a good strategy for Scribble or not. After all, these definitions are very easy to write.