[racket] provide/doc for classes and methods?

From: Eduardo Bellani (ebellani at gmail.com)
Date: Wed Sep 14 10:50:07 EDT 2011

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello there folks.

I am trying to build in-source scribble documentation for classes and
methods and I am a bit confused as to how to proceed. Usually to
provide the contract and documentation for a procedure I code the
following:


(provide/doc
 (proc-doc/names
  string->csv
  (string? . -> . string?)
  (thing)
  @{Returns a csv format from the @racket(thing).}))

What I can do with classes is the normal internal contract thing, like

(define/contract data%
  (class/c (init-field (serial positive?)
           (stuff      (any/c . ->m . number?))
  (class object%
    (super-new)
    (inspect #f)
    (init-field serial)
    (define/public (stuff) (random 10))))

Problem is, there is no documentation (apart from the contract of
course) inserted in this code like the first example. Anybody knows
how to coerce the second into the first? Some pointers to examples
would be extra cool.

Thanks,
Eduardo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAk5wvx8ACgkQSbLl0kCTjGl21ACfXfp7Yoza+4BZe4IHIxdb25pO
4UsAniCgHRUmyjzoEvV/RGY2hElfiBk3
=m7LM
-----END PGP SIGNATURE-----


Posted on the users mailing list.