FWIW, Kawa has define-alias which is more-or-less the same thing:
https://www.gnu.org/software/kawa/Locations.html#idm45230717976176
Most of your examples work with no problems on stock Kawa
if I replace alias by define-alias.
For the record, the ones that don't work are:
(1)
(let ((y +))
(define-alias x y)
(define y *)
(free-identifier=? #'x #'y)) ⟹ #f rather than error
This could be an extension because of more liberal Kawa ordering rules;
I haven't looked into it.
(2)
(alias inject unquote)
`(list (inject (+ 1 2)) 4)
==> (list (inject (+ 1 2)) 4) rather than (list 3 4)
This may be just a missing followAliases call in the implementation.
(3)
(syntax-case #'pear ()
(pvar
(let* ()
(alias fruit pvar)
(syntax->datum #'(a fruit)))))
/tmp/x.scm:34:30: reference to pattern variable pvar outside syntax template
/tmp/x.scm:34:10: invalid argument to location
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/