manuel-serrano / bigloo

a practical Scheme compiler
http://www-sop.inria.fr/indes/fp/Bigloo
Other
135 stars 19 forks source link

error on embedded define-syntax #46

Open Kyuvi opened 4 years ago

Kyuvi commented 4 years ago

I am using Bigloo 4.3h on Linux Debian 10 (amd64 architecture) which I installed by downloading from the repository and using dpkg -i ...

I use this code in my .bigloorc to shorten some words in the repl ....

(define-syntax def-syntax-alias
   (syntax-rules ()
     ((_ new-name old-name)
      (define-syntax new-name
        (syntax-rules ()
          ((_ . args) (old-name . args)))))))

It works in GNU guile and in some older versions of Bigloo (but not in racket due to it's differences). however now I am getting this error when I try to run it.

=> (def-syntax-alias df define) *** ERROR:def-syntax-alias: No matching clause -- (hygiene.r5rs.mark1001def-syntax-alias . args)

it seems to be substituting the first "def-syntax-alias" where it should be substituting "new-name" (in this case df)

I can work around it, but I am wondering if this is a bug or intentional behavior due to redesign.