questions for `derive-check` Peter McGoron (29 May 2026 10:15 UTC)
Re: questions for `derive-check` Artyom Bologov (29 May 2026 12:33 UTC)
Re: questions for `derive-check` Peter McGoron (04 Jun 2026 13:05 UTC)

Re: questions for `derive-check` Peter McGoron 04 Jun 2026 13:03 UTC

On 5/29/26 08:33, Artyom Bologov wrote:
> Did I understand you correctly?

Yes you have. Thank you for the response.

 > Oh. Right. When we talk about `eval` we need to also think of the
 > environment. I am tempted by two options:
 >
 > a) Simply saying “current lexical environment” or “current dynamic
 >    environment.” But that’s a heavy burden on the implementation and
 >    huge under-specification.
 >
 > b) Providing environment explicitly as an (optional?) second argument to
 >    `derive-check`.
 >
 > Now I’m inclined to add a second argument to `derive-check` (b).

For syntax object based systems (R6RS, Racket, etc.) it would be
possible to capture the compile-time lexical environment if the
procedure were given a syntax object argument, although those are not
`eval`able datum values. (Although depending on how fancy the
type-system is, that might cause issues where a types are inferred
correctly. Interesting problem.)

A second optional argument is probably the best option.

-- Peter McGoron