unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* with-syntax return error in Guile, not in Kawa or Racket
@ 2024-05-05 12:36 Damien Mattei
  2024-05-05 12:48 ` Jean Abou Samra
  0 siblings, 1 reply; 25+ messages in thread
From: Damien Mattei @ 2024-05-05 12:36 UTC (permalink / raw)
  To: guile-user

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-05-15 17:44 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05 12:36 with-syntax return error in Guile, not in Kawa or Racket Damien Mattei
2024-05-05 12:48 ` Jean Abou Samra
2024-05-05 13:35   ` Damien Mattei
2024-05-06  7:27     ` Damien Mattei
2024-05-06  9:41       ` Jean Abou Samra
2024-05-06 10:29         ` Damien Mattei
2024-05-06 12:03           ` Damien Mattei
2024-05-06 17:52         ` Damien Mattei
2024-05-06 18:58           ` Maxime Devos
2024-05-06 21:34             ` Damien Mattei
2024-05-09  9:21               ` Maxime Devos
2024-05-09 21:56                 ` Damien Mattei
2024-05-09 22:35                   ` Jean Abou Samra
2024-05-10  9:40                     ` Damien Mattei
2024-05-10 10:33                       ` Jean Abou Samra
2024-05-10 13:52                         ` Damien Mattei
2024-05-10 15:24                           ` Jean Abou Samra
2024-05-10 20:21                             ` Damien Mattei
2024-05-11 10:53                               ` Damien Mattei
2024-05-11 19:14                                 ` Jean Abou Samra
2024-05-12 12:37                                   ` Damien Mattei
2024-05-10 21:57                             ` Damien Mattei
2024-05-10 22:23                               ` Jean Abou Samra
2024-05-10 23:04                                 ` Damien Mattei
2024-05-15 17:44                     ` Macros that don't work Keith Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).