I also get a similar error message with this: #lang racket/base (require typed/racket/base) (require/typed racket/math [pi Real])
. . ../../Applications/Racket/April-24/Racket v6.2.0.2/collects/racket/contract/private/blame.rkt:143:0: pi: broke its contract promised: #f produced: 3.141592653589793 in: #f contract from: (interface for pi) blaming: (interface for pi) (assuming the contract is correct) at: unsaved-editor:3.28 So should require/typed produce a syntax error about being used in an untyped context? On May 8, 2015, at 5:44 PM, Alexander D. Knauth <[email protected]> wrote: > This doesn’t happen if I change the language of the submodule to > typed/racket/base, so I’m guessing this is because require/typed isn’t meant > to be used in untyped code. > > So should require/typed produce a syntax error when it’s used in untyped code > like this? > > On May 8, 2015, at 5:30 PM, Sam Tobin-Hochstadt <[email protected]> wrote: > >> This appears to be a bug -- my guess is that the contract isn't >> actually generated, and thus turns into `#f` -- that's what >> `require/typed` expands to, before TR inserts the real contract. >> >> Sam >> >> On Fri, May 8, 2015 at 5:26 PM, Alexander D. Knauth >> <[email protected]> wrote: >>> I have this file: >>> #lang typed/racket >>> (provide x) >>> (define x : Natural 3) >>> (module* main racket/base >>> (require typed/racket/base) >>> (require/typed (submod "..") >>> [x Natural])) >>> >>> I get this strange error message: >>> . . ../../../../../Applications/Racket/April-24/Racket >>> v6.2.0.2/collects/racket/contract/private/blame.rkt:143:0: x: broke its >>> contract >>> promised: #f >>> produced: 3 >>> in: #f >>> contract from: (interface for x) >>> blaming: (interface for x) >>> (assuming the contract is correct) >>> at: /Users/Alex/Documents/DrRacket/tr-submod-error/lib.rkt:7.18 >>> >>> What? >>> >>> I just realized I meant to use require/untyped-contract instead of >>> require/typed, but still, what? >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Racket Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

