I did #1681.
The region one is arguably correct.
> On May 6, 2017, at 6:36 PM, Dupéron Georges <jahvascriptman...@gmail.com>
> Le dimanche 7 mai 2017 00:27:36 UTC+2, Daniel Prager a écrit :
>> Thanks Georges
>> It looks suggestive, but I'm struggling to follow the details of
>> with-contract / blame-id. An example of use would be very helpful in the
> This gives "blaming: (region unsafe-factorial)" instead of "blaming:
> (function unsafe-factorial)". Aside from this slight leak, the messages are
> identical. Supposing this code is correct (I never used with-contract
> before), if you clean it up a bit and add an example to the docs, I'm sure a
> PR would be welcome :) .
> #lang racket
> (define-syntax-rule (define/tight (fn args ...)
> body ...)
> (define (fn args ...) (fn/impl args ...))
> (with-contract fn
> ([fn/impl ctc])
> #:freevar fn ctc
> (define (fn/impl args ...)
> body ...))))
> (define/tight [unsafe-factorial n]
> (-> (and/c integer? (>=/c 0)) (and/c integer? (>=/c 0)))
> (if (zero? n)
> (* n (unsafe-factorial (- n 10)))))
> (unsafe-factorial 5)
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.