On 8/16/20 1:54 PM, Claude Marinier wrote:
Allô,
I have discovered types.
https://wiki.call-cc.org/man/5/Types <https://wiki.call-cc.org/man/5/Types>
When used judiciously and sparingly, this could be useful to prevent
errors and provide optimisation (specialisation) hints to the compiler.
Is there a guide to using this well? I would like examples. Perhaps one
of the Chicken libraries or eggs can be used as an example.
Merci.
--
Claude Marinier
Hello,
I myself would like some good usage examples of `chicken.type`, but if
you're just getting started and not sure how to use them, or you're
getting errors, I hope [0, 1, 2] may be helpful to you. The annotations
on the macros in [1, 2] are not as strict as they could be. And some of
the other type annotations may even be wrong (e.g. using the symbol uri
to mean an URI object; the way I use it, it's the same as using *, the
"any" type), because usually the compiler doesn't complain too much and
I forget to update them.
[0]:
https://github.com/SiIky/ssg/blob/81e863733fa6b3e34608adc1ca89065f0759c836/ssg.converters.lowdown.scm#L32-L42
[1]:
https://github.com/SiIky/invidious.scm/blob/09c1b26080ecf1ba64a86b3ece501d975ea3608a/invidious.req.v1.scm#L41-L58
[2]:
https://github.com/SiIky/invidious.scm/blob/09c1b26080ecf1ba64a86b3ece501d975ea3608a/invidious.uri.v1.scm
André Sá