[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
with-syntax return error in Guile, not in Kawa or Racket
From: |
Damien Mattei |
Subject: |
with-syntax return error in Guile, not in Kawa or Racket |
Date: |
Sun, 5 May 2024 14:36:27 +0200 |
hi,
Guile:
(base) mattei@mbp-touch-bar Scheme-PLUS-for-Guile % guile
GNU Guile 3.0.8.99-f3ea8
Copyright (C) 1995-2022 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (define-syntax test-it
(lambda (stx)
(syntax-case stx ()
((_ term1)
(with-syntax ((var (syntax->datum #'term1)))
#'var)))))
scheme@(guile-user)> (test-it (+ 2 3))
While compiling expression:
Syntax error:
unknown file:#f:#f: encountered raw symbol in macro output in subform + of
(test-it (+ 2 3))
Kawa:
(base) mattei@mbp-touch-bar Scheme-PLUS-for-Guile % kawa
#|kawa:1|# (define-syntax test-it
#|.....2|#
#|.....3|# (lambda (stx)
#|.....4|#
#|.....5|# (syntax-case stx ()
#|.....6|#
#|.....7|# ((_ term1)
#|.....8|#
#|.....9|# (with-syntax ((var (syntax->datum #'term1)))
#|....10|#
#|....11|# #'var)))))
#|....12|#
#|kawa:13|# (test-it (+ 2 3))
5
Racket:
Language: racket, with debugging; memory limit: 8192 MB.
> (define-syntax test-it
(lambda (stx)
(syntax-case stx ()
((_ term1)
(with-syntax ((var (syntax->datum #'term1)))
#'var)))))
> (test-it (+ 2 3))
5
why,why?
Damien
- with-syntax return error in Guile, not in Kawa or Racket,
Damien Mattei <=
- Re: with-syntax return error in Guile, not in Kawa or Racket, Jean Abou Samra, 2024/05/05
- Re: with-syntax return error in Guile, not in Kawa or Racket, Damien Mattei, 2024/05/05
- Re: with-syntax return error in Guile, not in Kawa or Racket, Damien Mattei, 2024/05/06
- Re: with-syntax return error in Guile, not in Kawa or Racket, Jean Abou Samra, 2024/05/06
- Re: with-syntax return error in Guile, not in Kawa or Racket, Damien Mattei, 2024/05/06
- Re: with-syntax return error in Guile, not in Kawa or Racket, Damien Mattei, 2024/05/06
- Re: with-syntax return error in Guile, not in Kawa or Racket, Damien Mattei, 2024/05/06
- RE: with-syntax return error in Guile, not in Kawa or Racket, Maxime Devos, 2024/05/06
- Re: with-syntax return error in Guile, not in Kawa or Racket, Damien Mattei, 2024/05/06
- RE: with-syntax return error in Guile, not in Kawa or Racket, Maxime Devos, 2024/05/09