Re: [racket-users] How do I get negative blame information?

2018-09-10 Thread David Storrs
On Mon, Sep 10, 2018 at 2:18 PM, Alexis King wrote: > I think the answer here really is “don’t use `contract` directly”. The > actual implementation of the contract system does some fancy rebinding > of my-func when you use define/contract, turning this: > >(define/contract x ctc rhs) > > int

Re: [racket-users] How do I get negative blame information?

2018-09-10 Thread Alexis King
I think the answer here really is “don’t use `contract` directly”. The actual implementation of the contract system does some fancy rebinding of my-func when you use define/contract, turning this: (define/contract x ctc rhs) into this: (define x-awaiting-neg (let ([tmp rhs]) (l

[racket-users] How do I get negative blame information?

2018-09-10 Thread David Storrs
(define (my-func thunk-arg) (contract integer? (thunk-arg) 'my-func )) What should I replace with? NB: I know that in the example I could do (define/contract (my-func thunk-arg) (-> (-> integer?) integer?) (thunk-arg)) but I'm looking for an answer to the generic case. -- You receiv