Open Metaxal opened 2 weeks ago
File A.rkt:
#lang racket (provide procA (contract-out [procB (-> any/c any/c boolean?)]) (define (procA x y) (equal? x y)) (define (procB x y) (equal? x y ))
file B.rkt:
(require "A.rkt") (procB) ; no syntax error :( (procA) ; syntax error, as required by define2, but exported without contracts
Fortunately, when using the option #:unprotected-submodule no-contract of contract-out together with (require (submod "A.rkt" no-contract)), the benefits of define2 are kept intact.
#:unprotected-submodule no-contract
contract-out
(require (submod "A.rkt" no-contract))
File A.rkt:
file B.rkt: