Re: [racket-users] type annotation example

2019-02-28 Thread Brian Craft
It was just random. I'd installed it previously & lost track of how long it 
had been.

On Wednesday, February 27, 2019 at 7:44:24 PM UTC-8, Sam Tobin-Hochstadt 
wrote:
>
> Brian, 
> Since this has turned out to be relevant for other reasons, can you 
> say how you ended up using version 6.0? Was it automatically available 
> to you somewhere, or did you install it? 
>
> Sam 
>
> On Mon, Feb 25, 2019 at 1:46 PM Brian Craft  > wrote: 
> > 
> > yeah, maybe version. Has this changed since 6.0? 
> > 
> > On Monday, February 25, 2019 at 10:39:23 AM UTC-8, johnbclements wrote: 
> >> 
> >> When I paste that code into a file called `foo`, it runs fine. 
> Transcript: 
> >> 
> >> hardy:/tmp clements> cat foo 
> >> #lang typed/racket 
> >> (require typed/racket/base) 
> >> 
> >> (: fn (-> String Symbol)) 
> >> (define (fn str) 'foo) 
> >> hardy:/tmp clements> racket foo 
> >> hardy:/tmp clements> 
> >> 
> >> I can’t honestly guess what the problem is. Wrong version of racket? 
> >> 
> >> John 
> >> 
> >> 
> >> > On Feb 25, 2019, at 10:11 AM, Brian Craft  
> wrote: 
> >> > 
> >> > Doing a cut & paste from the typed racket docs, I'm getting a compile 
> error. Input file: 
> >> > 
> >> > #lang typed/racket 
> >> > (require typed/racket/base) 
> >> > 
> >> > (: fn (-> String Symbol)) 
> >> > (define (fn str) 'foo) 
> >> > 
> >> > 
> >> > 'fn' taken from this page: 
> >> > 
> >> > 
> https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29
>  
> >> > 
> >> > 
> >> > Running with 'racket foo', gives me 
> >> > Type Checker: ->: bad syntax 
> >> >   in: (-> String Symbol) 
> >> > 
> >> > 
> >> > What am I doing wrong? 
> >> > 
> >> > 
> >> > -- 
> >> > 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...@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...@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.


Re: [racket-users] type annotation example

2019-02-27 Thread Sam Tobin-Hochstadt
Brian,
Since this has turned out to be relevant for other reasons, can you
say how you ended up using version 6.0? Was it automatically available
to you somewhere, or did you install it?

Sam

On Mon, Feb 25, 2019 at 1:46 PM Brian Craft  wrote:
>
> yeah, maybe version. Has this changed since 6.0?
>
> On Monday, February 25, 2019 at 10:39:23 AM UTC-8, johnbclements wrote:
>>
>> When I paste that code into a file called `foo`, it runs fine. Transcript:
>>
>> hardy:/tmp clements> cat foo
>> #lang typed/racket
>> (require typed/racket/base)
>>
>> (: fn (-> String Symbol))
>> (define (fn str) 'foo)
>> hardy:/tmp clements> racket foo
>> hardy:/tmp clements>
>>
>> I can’t honestly guess what the problem is. Wrong version of racket?
>>
>> John
>>
>>
>> > On Feb 25, 2019, at 10:11 AM, Brian Craft  wrote:
>> >
>> > Doing a cut & paste from the typed racket docs, I'm getting a compile 
>> > error. Input file:
>> >
>> > #lang typed/racket
>> > (require typed/racket/base)
>> >
>> > (: fn (-> String Symbol))
>> > (define (fn str) 'foo)
>> >
>> >
>> > 'fn' taken from this page:
>> >
>> > https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29
>> >
>> >
>> > Running with 'racket foo', gives me
>> > Type Checker: ->: bad syntax
>> >   in: (-> String Symbol)
>> >
>> >
>> > What am I doing wrong?
>> >
>> >
>> > --
>> > 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...@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.

-- 
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.


Re: [racket-users] type annotation example

2019-02-27 Thread Alex Knauth


> On Feb 25, 2019, at 2:05 PM, Sam Tobin-Hochstadt  wrote:
> 
> Version 6.0 was released 5 years ago, so while I don't recall exactly when 
> the prefix -> syntax was introduced, it was most likely since then. 

The -> prefix syntax was introduced in version 6.0.1. If you really need to use 
6.0, you can use (String -> Symbol) instead.

However if you can upgrade, you probably should. A lot of things have improved 
in Typed Racket between 6.0 and now.

Alex Knauth

> Sam
> 
> On Mon, Feb 25, 2019, 1:46 PM Brian Craft  > wrote:
> yeah, maybe version. Has this changed since 6.0?
> 
> On Monday, February 25, 2019 at 10:39:23 AM UTC-8, johnbclements wrote:
> When I paste that code into a file called `foo`, it runs fine. Transcript: 
> 
> hardy:/tmp clements> cat foo 
> #lang typed/racket 
> (require typed/racket/base) 
> 
> (: fn (-> String Symbol)) 
> (define (fn str) 'foo) 
> hardy:/tmp clements> racket foo 
> hardy:/tmp clements> 
> 
> I can’t honestly guess what the problem is. Wrong version of racket? 
> 
> John 
> 
> 
> > On Feb 25, 2019, at 10:11 AM, Brian Craft > wrote: 
> > 
> > Doing a cut & paste from the typed racket docs, I'm getting a compile 
> > error. Input file: 
> > 
> > #lang typed/racket 
> > (require typed/racket/base) 
> > 
> > (: fn (-> String Symbol)) 
> > (define (fn str) 'foo) 
> > 
> > 
> > 'fn' taken from this page: 
> > 
> > https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29
> >  
> > 
> >  
> > 
> > 
> > Running with 'racket foo', gives me 
> > Type Checker: ->: bad syntax 
> >   in: (-> String Symbol) 
> > 
> > 
> > What am I doing wrong? 
> > 
> > 
> > -- 
> > 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...@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 
> .
> 
> -- 
> 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.


Re: [racket-users] type annotation example

2019-02-25 Thread Sam Tobin-Hochstadt
Version 6.0 was released 5 years ago, so while I don't recall exactly when
the prefix -> syntax was introduced, it was most likely since then.

Sam

On Mon, Feb 25, 2019, 1:46 PM Brian Craft  wrote:

> yeah, maybe version. Has this changed since 6.0?
>
> On Monday, February 25, 2019 at 10:39:23 AM UTC-8, johnbclements wrote:
>>
>> When I paste that code into a file called `foo`, it runs fine.
>> Transcript:
>>
>> hardy:/tmp clements> cat foo
>> #lang typed/racket
>> (require typed/racket/base)
>>
>> (: fn (-> String Symbol))
>> (define (fn str) 'foo)
>> hardy:/tmp clements> racket foo
>> hardy:/tmp clements>
>>
>> I can’t honestly guess what the problem is. Wrong version of racket?
>>
>> John
>>
>>
>> > On Feb 25, 2019, at 10:11 AM, Brian Craft  wrote:
>> >
>> > Doing a cut & paste from the typed racket docs, I'm getting a compile
>> error. Input file:
>> >
>> > #lang typed/racket
>> > (require typed/racket/base)
>> >
>> > (: fn (-> String Symbol))
>> > (define (fn str) 'foo)
>> >
>> >
>> > 'fn' taken from this page:
>> >
>> >
>> https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29
>> >
>> >
>> > Running with 'racket foo', gives me
>> > Type Checker: ->: bad syntax
>> >   in: (-> String Symbol)
>> >
>> >
>> > What am I doing wrong?
>> >
>> >
>> > --
>> > 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...@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.
>

-- 
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.


Re: [racket-users] type annotation example

2019-02-25 Thread Brian Craft
yeah, maybe version. Has this changed since 6.0?

On Monday, February 25, 2019 at 10:39:23 AM UTC-8, johnbclements wrote:
>
> When I paste that code into a file called `foo`, it runs fine. Transcript: 
>
> hardy:/tmp clements> cat foo 
> #lang typed/racket 
> (require typed/racket/base) 
>
> (: fn (-> String Symbol)) 
> (define (fn str) 'foo) 
> hardy:/tmp clements> racket foo 
> hardy:/tmp clements> 
>
> I can’t honestly guess what the problem is. Wrong version of racket? 
>
> John 
>
>
> > On Feb 25, 2019, at 10:11 AM, Brian Craft  > wrote: 
> > 
> > Doing a cut & paste from the typed racket docs, I'm getting a compile 
> error. Input file: 
> > 
> > #lang typed/racket 
> > (require typed/racket/base) 
> > 
> > (: fn (-> String Symbol)) 
> > (define (fn str) 'foo) 
> > 
> > 
> > 'fn' taken from this page: 
> > 
> > 
> https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29
>  
> > 
> > 
> > Running with 'racket foo', gives me 
> > Type Checker: ->: bad syntax 
> >   in: (-> String Symbol) 
> > 
> > 
> > What am I doing wrong? 
> > 
> > 
> > -- 
> > 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...@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.


Re: [racket-users] type annotation example

2019-02-25 Thread 'John Clements' via Racket Users
When I paste that code into a file called `foo`, it runs fine. Transcript:

hardy:/tmp clements> cat foo
#lang typed/racket
(require typed/racket/base)

(: fn (-> String Symbol))
(define (fn str) 'foo)
hardy:/tmp clements> racket foo
hardy:/tmp clements> 

I can’t honestly guess what the problem is. Wrong version of racket? 

John


> On Feb 25, 2019, at 10:11 AM, Brian Craft  wrote:
> 
> Doing a cut & paste from the typed racket docs, I'm getting a compile error. 
> Input file:
> 
> #lang typed/racket
> (require typed/racket/base)
> 
> (: fn (-> String Symbol))
> (define (fn str) 'foo)
> 
> 
> 'fn' taken from this page:
> 
> https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29
> 
> 
> Running with 'racket foo', gives me
> Type Checker: ->: bad syntax
>   in: (-> String Symbol)
> 
> 
> What am I doing wrong?
> 
> 
> -- 
> 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.


[racket-users] type annotation example

2019-02-25 Thread Brian Craft
Doing a cut & paste from the typed racket docs, I'm getting a compile 
error. Input file:

#lang typed/racket
(require typed/racket/base)

(: fn (-> String Symbol))
(define (fn str) 'foo)


'fn' taken from this page:

https://docs.racket-lang.org/ts-guide/more.html#%28part._when-annotations~3f%29


Running with 'racket foo', gives me
Type Checker: ->: bad syntax
  in: (-> String Symbol)


What am I doing wrong?

-- 
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.