Re: [racket-users] Typed racket and continuations

2016-08-30 Thread Andrew Kent
@Jerzy here's (perhaps an unneeded) clarification just in case it helps: Matthias said initially in a set theoretic type system continuations could be considered as having the empty set as their return _type_ (not value) -- or in other words, their return type would be the empty type, or bottom (wh

Re: [racket-users] Typed racket and continuations

2016-08-30 Thread Matthias Felleisen
> On Aug 30, 2016, at 3:22 AM, Jerzy Karczmarczuk > wrote: > > Could anybody justify this convention? Here the empty set represents the set of all possible result values. That’s a meta-set or a set about things in the language. > An empty set is a legitimate piece of data. If you wanted

Re: [racket-users] Typed racket and continuations

2016-08-30 Thread Robby Findler
The reason the first one doesn't work is that the type checker has figured out that the variable is mutable and HASN"T figured out that there are no other threads around that could mutate it. In the second case, it knows there are no other threads around to mutate it because even if there were othe

Re: [racket-users] Typed racket and continuations

2016-08-30 Thread Alex Knauth
> On Aug 30, 2016, at 2:08 AM, Sourav Datta wrote: > > I tried this approach with Racket 6.5 and still get the type checker error > when trying to call the continuation after it has been set. > > #lang typed/racket > > (define-type EmptySet (U)) > > (: d-or-s (U False (-> Number EmptySet)))

Re: [racket-users] Typed racket and continuations

2016-08-30 Thread Jerzy Karczmarczuk
Le 30/08/2016 à 02:26, Hendrik Boom a écrit : On Mon, Aug 29, 2016 at 04:33:15PM -0400, Matthias Felleisen wrote: Continuations don’t return. In a set-oriented type system this means their result type is the empty set: I tried, but failed, to get this convention into Algol 68 for functinos tha

Re: [racket-users] Typed racket and continuations

2016-08-29 Thread Sourav Datta
I tried this approach with Racket 6.5 and still get the type checker error when trying to call the continuation after it has been set. #lang typed/racket (define-type EmptySet (U)) (: d-or-s (U False (-> Number EmptySet))) (define d-or-s #f) (: double-or-same (-> Number Number)) (define (d

Re: [racket-users] Typed racket and continuations

2016-08-29 Thread Hendrik Boom
On Mon, Aug 29, 2016 at 04:33:15PM -0400, Matthias Felleisen wrote: > > Continuations don’t return. In a set-oriented type system this means their > result type is the empty set: I tried, but failed, to get this convention into Algol 68 for functinos that don't return. -- hendrik -- You rec

Re: [racket-users] Typed racket and continuations

2016-08-29 Thread Matthias Felleisen
Continuations don’t return. In a set-oriented type system this means their result type is the empty set: #lang typed/racket (define-type EmptySet (U)) (: d-or-s (U False (-> Number EmptySet))) (define d-or-s #f) (: double-or-same (-> Number Number)) (define (double-or-same x) (call/cc (lamb

[racket-users] Typed racket and continuations

2016-08-29 Thread Sourav Datta
Hey everyone, I am a beginner in Racket and recently learned the basic concepts of continuations. I like Racket's support of multiple types of continuations as opposed one type in Scheme. Recently I also started learning about typed Racket. My problem is, I am not sure how I can annotate a cont