On 24-07-2022 03:21, Zelphir Kaltstahl wrote:
If you meant: how can identifier-syntax + syntax-error be used? -- I don't have more information than the explanations in the manual on identifier-syntax and syntax-error.~~~~ (define-syntax require (identifier-syntax (syntax-error "'require' can only be used as part of a contract construct"))) ~~~~Can you explain how it works?
If you meant: how does it work? I don't know how Guile's macro system is implemented, you'll have to look at the source code of (ice-9 psyntax), maybe read the paper it cites.
If you meant: how to use it? All you have to do is replace your (define require ...) by the (define-syntax require ...)
Greetings, Maxime
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature