Replace procedure-rename with eta-expansion.
Closes PR 14612. original commit: 393d7d49fc6c051bdcf1b221979b856747898cf2
This commit is contained in:
parent
6031c0697b
commit
70567e3458
|
@ -289,7 +289,12 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
(syntax-parse stx
|
||||
[(_ name:id ty:expr)
|
||||
#`(begin
|
||||
#,(ignore #'(define name (procedure-rename (make-predicate ty) 'name)))
|
||||
;; We want the value bound to name to have a nice object name. Using the built in mechanism
|
||||
;; of define has better performance than procedure-rename.
|
||||
#,(ignore
|
||||
#'(define name
|
||||
(let ([pred (make-predicate ty)])
|
||||
(lambda (x) (pred x)))))
|
||||
;; not a require, this is just the unchecked declaration syntax
|
||||
#,(internal #'(require/typed-internal name (Any -> Boolean : ty))))]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user