Format of S-expression metadata for SRFI documents Lassi Kortela (11 Mar 2019 14:59 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (11 Mar 2019 15:05 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (11 Mar 2019 16:05 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (11 Mar 2019 16:02 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (11 Mar 2019 16:02 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (11 Mar 2019 16:12 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (11 Mar 2019 17:30 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (11 Mar 2019 17:34 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (11 Mar 2019 17:49 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (11 Mar 2019 20:35 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 09:43 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 13:22 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (12 Mar 2019 17:02 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 17:15 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 17:35 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 17:51 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (13 Mar 2019 15:28 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (13 Mar 2019 17:01 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (13 Mar 2019 15:41 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (13 Mar 2019 16:54 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (13 Mar 2019 17:17 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (13 Mar 2019 19:00 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (14 Mar 2019 13:28 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (14 Mar 2019 17:33 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (23 Mar 2019 10:35 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (23 Mar 2019 16:37 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (24 Mar 2019 09:15 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (24 Mar 2019 09:26 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (24 Mar 2019 09:27 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (25 Mar 2019 20:25 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (25 Mar 2019 22:04 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (25 Mar 2019 22:13 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (25 Mar 2019 22:42 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (25 Mar 2019 22:50 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (25 Mar 2019 22:54 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (25 Mar 2019 23:56 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (26 Mar 2019 00:16 UTC)
Re: Format of S-expression metadata for SRFI documents John Cowan (26 Mar 2019 01:27 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (26 Mar 2019 08:54 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (26 Mar 2019 04:17 UTC)
Re: Format of S-expression metadata for SRFI documents Göran Weinholt (26 Mar 2019 21:38 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (26 Mar 2019 23:36 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (27 Mar 2019 21:42 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (13 Mar 2019 21:57 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (14 Mar 2019 10:49 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (13 Mar 2019 17:46 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (13 Mar 2019 18:53 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (14 Mar 2019 11:03 UTC)
Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun (14 Mar 2019 11:07 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (14 Mar 2019 11:12 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (14 Mar 2019 11:34 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (14 Mar 2019 17:24 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (14 Mar 2019 20:40 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (11 Mar 2019 18:09 UTC)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (11 Mar 2019 20:37 UTC)
Re: Format of S-expression metadata for SRFI documents John Cowan (11 Mar 2019 22:20 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 07:08 UTC)
Re: Format of S-expression metadata for SRFI documents Lassi Kortela (12 Mar 2019 07:45 UTC)
(missing)
Re: Format of S-expression metadata for SRFI documents Arthur A. Gleckler (12 Mar 2019 15:12 UTC)

Re: Format of S-expression metadata for SRFI documents Ciprian Dorin Craciun 13 Mar 2019 15:27 UTC

On Tue, Mar 12, 2019 at 7:15 PM Lassi Kortela <xxxxxx@lassi.io> wrote:
> Ciprian's version separates all combinations of required and optional
> arguments so that each combination is a separate arglist. Because there
> can be interdependencies between arguments. E.g.:
>
>     (make-vector
>       (type constructor)
>       (export scheme:base)
>       (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)))

As said this was a choice of style.  Nothing stops one to just say
`(signature ((range-length) -> vector))`.

In fact the "signature" part has the Erlang semantic:
* given a set of concrete arguments,  (i.e. their number and types are known)
* iterate top-to-bottom through all the "signature" variants, and
* the first variant which matches the concrete arguments (i.e. they
are of the same type, and possibly taking into account optional and
rest variants),
* is the one that should be considered for those concrete arguments;

(I think this resembles more the `cond` or `case-lambda` style.)

> That doesn't have arg names but they can be added next to the types.

The underlying tool does support argument names.  (I'll try to come-up
with an example that takes everything into account.)

> Ciprian, what's your current feeling about what the best place would be
> to store your type signatures? Would you like to have them in the same
> metadata file or a different one?

I think separate files is easier to integrate various tools and workflows.

> Also, would the type signatures affect syntax definitions, or would
> those be done in traditional Lisp style?

Syntaxes (i.e. "macros") have a different "signature" syntax, one very
similar to the actual `syntax-rules` syntax.

For example (from simple to complex ones) the following are the HTML rendering:

* https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/definitions/if.html#definition__r7rs__if
* https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/definitions/define.html#definition__r7rs__define
* https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/definitions/let.html#definition__r7rs__let
* https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/definitions/do.html#definition__r7rs__do
* https://vonuvoli.volution.ro/documentation/libraries-html/r7rs/definitions/define-record-type.html#definition__r7rs__define-record-type

And their S-expression based definitions:

* https://github.com/volution/vonuvoli-scheme/blob/development/documentation/libraries-r7rs.ss#L2811
* https://github.com/volution/vonuvoli-scheme/blob/development/documentation/libraries-r7rs.ss#L1967
* https://github.com/volution/vonuvoli-scheme/blob/development/documentation/libraries-r7rs.ss#L2053
* https://github.com/volution/vonuvoli-scheme/blob/development/documentation/libraries-r7rs.ss#L2551
* https://github.com/volution/vonuvoli-scheme/blob/development/documentation/libraries-r7rs.ss#L3102

Ciprian.