[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
macro syntax-error works in prefix but not curly-infix
From: |
Damien Mattei |
Subject: |
macro syntax-error works in prefix but not curly-infix |
Date: |
Sat, 4 Sep 2021 16:41:41 +0200 |
hi,
i have this macro:
(define-syntax <+
(syntax-rules ()
((_ var expr) (define var expr))
((_ err ...) (syntax-error "Bad <- form")) ;; does not work in infix !
))
why my syntax-error pattern never reach in infix:
scheme@(guile-user)> {x <+ 7 8}
While compiling expression:
Syntax error:
unknown file:3:3: source expression failed to match any pattern in form <+
but ok in prefix:
scheme@(guile-user)> (<+ x 9 10)
While compiling expression:
Syntax error:
unknown location: <+: Bad <- form in form (<+ x 9 10)
why?
Regards,
Damien
- macro syntax-error works in prefix but not curly-infix,
Damien Mattei <=