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 Gerar
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 racket/gene
2 matches
Mail list logo