[racket] the typed Values restriction
If you want the continuation-passing-style version, you'll need to
explicitly handle the multiple-ness of multiple values:
#lang typed/racket
(: my-force (All (A ...) (-> (-> (Values A ...)) (Values A ...))))
(define (my-force x) (x))
(ann (my-force (lambda () (values (void) (void)))) (Values Void Void))
Sam
On Wed, Mar 18, 2015 at 5:23 PM Benjamin Greenman <blg59 at cornell.edu> wrote:
> On Wed, Mar 18, 2015 at 5:16 PM, Michael Wilber <gcr at sneakygcr.net> wrote:
>
>> this doesn't work in vanilla Racket
>>
> Sure, but it works without the let! For context, I ran into this issue
> adding types to a function originally written in continuation passing
> style. Switching to cons was an easy fix.
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150318/9c1175f3/attachment.html>