Re: [racket-users] Checking for fallbacks in generic contracts

2021-04-18 Thread Sage Gerard
For the time being I've decided to use this macro and attach contracts to the fallbacks a different way. Please let me know if there's a better solution. (define-syntax-rule (I/weak/c [method-id method-contract] ...) (I/c [method-id (or/c #f method-contract)] ...) On 4/17/21 10:48 PM, Sage

[racket-users] Checking for fallbacks in generic contracts

2021-04-17 Thread Sage Gerard
Playing with this program. Its output is in the comments. ; /tmp/gen.rkt:9:10: assertion violation ; expected: a procedure ; given: #f ; in: method m ; (I/c (m (-> I? 1))) ; [...removed the rest of the error...] ; 1 (module gen-contracts racket/base (require racket/contract racket/exn