Just as a word of caution here: with a different set of type
annotations, that program could go from a runtime error to a segfault.
You probably also want to at least disable TR's optimizations when you
do this.

Robby


On Tue, Dec 29, 2015 at 6:13 PM, Benjamin Greenman
<benjaminlgreen...@gmail.com> wrote:
>
> On Tue, Dec 29, 2015 at 7:05 PM, JCG <griffin...@gmail.com> wrote:
>>
>> If I understand this correctly, the unsafe version will perform the same
>> static checks on callers of the functions published by (provide) but not
>> incur contract cost.
>
>
> Yep, that's right.
>
> #lang typed/racket/base
> (require typed/racket/unsafe)
> (unsafe-require/typed racket/base (values (-> String Integer)))
>
> (string-append (values "foo") "bar")  ;; Type Error
> (+ (values "foo") 1)  ;; Runtime Error, because annotation on `values` is
> incorrect
>
> --
> 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 racket-users+unsubscr...@googlegroups.com.
> 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 racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to