these days I eventually started to try type annotations.
…and ran into a suspicious situation: The manual claims:
--> procedure type that is declared to modify locally held state
implicit claiming that procedures annotated as "->" would *not* touch any local state. The latter would be consistent with the "(DOM -> RNG : TYPE)" explanation wrt. predicates. From a language designers point of view this way of "using the longer symbol for procedures, which MAY touch local state" seems to be the correct way. Thus I'd say the docs are correct. However comparing the outcome, I'm afraid that something has been mixed up. When I declare a SRFI-9 record type and annotate the predicate procedure using the documented way I get from (: mailbox? (* -> boolean : boolean)) an *.types entry of (mailbox#mailbox? (#(procedure predicate: boolean) mailbox#mailbox? (*) boolean)) while a declaration (based on the wild guess that this undocumented use would do what I'd expect) like this (: tq-entry? (* --> boolean : boolean)) results in (atomic#tq-entry? (#(procedure predicate: boolean pure:) atomic#tq-entry? (*) boolean)) Note the "pure:" keyword, which I would have expected in the former case. The same holds true for "normal" (i.e., not predicate-style entries). Am I missing or missunderstanding somthing? If not, should the implementation be fixed since the documentation is correct with respect to taste or should the docs be changed because history as cemented the other way around already? Best Regards /Jerry ...... _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers