Changes -> and -! to %-> and %-!, because of too many name clashes in racket for ->.

This commit is contained in:
2025-08-18 09:18:58 +02:00
parent 6ce0a99f15
commit 7fc601d33c
4 changed files with 92 additions and 92 deletions

View File

@@ -1,29 +1,29 @@
#lang racket
(require (rename-in racket/class [send old-send] [new old-new]))
(require (for-syntax (rename-in roos [-> old->])))
(require (rename-in roos [-> old->]))
(require (for-syntax (rename-in roos [%-> old->])))
(require (rename-in roos [%-> old->]))
(provide (all-from-out roos)
(all-from-out racket/class)
-> send new
%-> send new
)
(define-syntax send
(syntax-rules ()
((_ obj method)
(if (roos-object? obj)
(-> obj method)
(old-> obj method)
(old-send obj method)))
((_ obj method a ...)
(if (roos-object? obj)
(-> obj method a ...)
(old-> obj method a ...)
(old-send obj method a ...)))
))
(define-syntax ->
(define-syntax %->
(syntax-rules ()
((_ obj method)
(if (roos-object? obj)