• R7RS: Missing important clause in description of "guard"

    From =?UTF-8?Q?Marc_Nieper=2DWi=C3=9Fkir@21:1/5 to All on Thu Aug 20 03:41:12 2020
    The R6RS contains the following clause in the standard library report, section 7.1, about "guard":

    "The final expression in a〈cond〉clause is in a tail context if the guard expression itself is."

    The R7RS is missing this requirement. It is, however, important for typical use cases of guard:

    (let retry ()
    (guard
    (e
    ((solvable-problem? e)
    (solve-problem! e)
    (retry)))
    (try)))

    Here, "try" is some procedure giving a result but which may fail (non-fatally). Without a PTC guarantee, the stack will fill up.

    The implementation of "guard" given in the appendix of the R7RS actually fulfills the missing requirement.

    Thus, I propose to add the missing clause to the (inofficial) list of R7RS errata.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)