Re: Format of S-expression metadata for SRFI documents Lassi Kortela 12 Mar 2019 17:35 UTC

It would even be possible to make a wild mash-up like this:

     (symbol
       (name "make-list")
       (procedure
        (traditional-signature
         (arg "n")
         (arg "fill" optional)
         (return "list"))
        (typed-signature
         ((range-length-zero) -> vector-empty)
         ((range-length-zero any) -> vector-empty)
         ((range-length-not-zero) -> vector-not-empty)
         ((range-length-not-zero any) -> vector-not-empty))))

The typed signature would get the arg names from the traditional one.
But this reads like a bit of a franken-signature to me.

With only the typed signatures it would be like this:

     (symbol
       (name "make-list")
       (procedure
         ((n range-length-zero) -> (list list-empty))
         ((n range-length-zero) (fill any) -> (list list-empty))
         ((n range-length-not-zero) -> (list list-not-empty))
         ((n range-length-not-zero) (fill any) -> (list list-not-empty))))

The downside is that arg names are duplicated between variants of the
argument list, and we'll need an algorithm to derive the traditional
Lisp-style signature.