Putting this new set-up through its paces I think I've found a few issues:
*1. Default argument goes missing from post-condition, leading to an
unexpected error ...*
(define/contract (greater-than-square? x [y 0])
(->i ([x real?])
([y real?])
[result boolean?]
#:post (x y r
I did #1681.
The region one is arguably correct.
> On May 6, 2017, at 6:36 PM, Dupéron Georges
> wrote:
>
> 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
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 docs!
This gives "blaming: (region unsafe-factorial)" instead of "blamin
Those who look shall be rewarded:
(define unsafe-factorial
(invariant-assertion
(-> (and/c integer? (>=/c 0)) (and/c integer? (>=/c 0)))
(lambda (n)
(if (zero? n)
1
(* n (unsafe-factorial (- n 10)))
(unsafe-factorial 5)
BUT @robby
the invariant-assertion u
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
docs!
Have you used this construct?
Dan
On Sun, May 7, 2017 at 7:44 AM, Dupéron Georges wrote:
> Le samedi 6 mai 2017 23:38:29 UTC+2, Dani
Le samedi 6 mai 2017 23:38:29 UTC+2, Daniel Prager a écrit :
> Although I understand why my macro does this
>
> unsafe-factorial: contract violation
> ...
> blaming: (function fn/impl)
> ...
> at: unsaved-editor:13.15
>
>
> Ideally I would prefer one which blames unsafe-factorial
>
> unsafe-fac
Although I understand why my macro does this
unsafe-factorial: contract violation
...
blaming: (function fn/impl)
...
at: unsaved-editor:13.15
Ideally I would prefer one which blames unsafe-factorial
unsafe-factorial: contract violation
...
blaming: (function unsafe-factorial)
...
at: u
> On May 5, 2017, at 11:30 PM, Daniel Prager wrote:
>
> Thank-you Matthias
>
> That's neat!
>
> And yes, I can write a basic macro. By introducing #:freevar I was able to
> improve the blame situation, but the abstraction is a bit leaky ...
>
> (define-syntax-rule (define/tight (fn args ...)
8 matches
Mail list logo