Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Ben Greenman
On Sun, Jun 12, 2016 at 9:53 PM, Daniel Prager wrote: > It seems that math libraries are a sweet-spot for TR. What else? > > The math library has to deal with all the same growing pains (inst, assert). I think part of the reason it looks so good is that it sparked

Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Daniel Prager
On Mon, Jun 13, 2016 at 10:59 AM, Matthew Butterick wrote: > Some people, when confronted with a problem, think "I know, I'll use Typed > Racket." Now they have (Pairof Problem Problem). > > Most droll ! Taken seriously, when is the right time for TR vs Contracts vs lots of

Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Matthias Felleisen
> On Jun 12, 2016, at 8:59 PM, Matthew Butterick wrote: > > Now they have (Pairof Problem Problem). :-)) [sorry for the bandwidth but this way cute] -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this

Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Matthew Butterick
Some people, when confronted with a problem, think "I know, I'll use Typed Racket." Now they have (Pairof Problem Problem). On Jun 12, 2016, at 2:29 PM, Ben Greenman wrote: > Yeah I agree `inst` needs more documentation. > And as someone (Matthew B.?) suggested

Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Daniel Prager
> we could really use a systematic way of documenting the type variables on each polymorphic function. That would be most welcome! Dan On Mon, Jun 13, 2016 at 7:29 AM, Ben Greenman wrote: > Yeah I agree `inst` needs more documentation. > And as someone (Matthew

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread Matthias Felleisen
> On Jun 12, 2016, at 7:02 PM, Asumu Takikawa wrote: > > On 2016-06-12 18:47:09 -0400, Matthias Felleisen wrote: >> This is what you will see: >> Typed Racket has detected unreachable code: #> (quote a)) …> > > Would it be helpful if Typed Racket told DrRacket to show

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread Asumu Takikawa
On 2016-06-12 18:47:09 -0400, Matthias Felleisen wrote: > This is what you will see: > Typed Racket has detected unreachable code: # (quote a)) …> Would it be helpful if Typed Racket told DrRacket to show such warnings as tooltips? (or maybe we can get orange squiggles or something a la other

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread Matthias Felleisen
> On Jun 12, 2016, at 3:57 PM, antoine wrote: > > The program didn't type check for clause 2 if i change for 999 for instance > and i see something no feedback in drracket when the program typecheck. It absolutely does — because TR knows that it’s an unreachable branch

Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Ben Greenman
Yeah I agree `inst` needs more documentation. And as someone (Matthew B.?) suggested before, we could really use a systematic way of documenting the type variables on each polymorphic function. On Sun, Jun 12, 2016 at 5:23 PM, Daniel Prager wrote: > Cc:ing the list

Re: [racket-users] Learning by doing Typed Racket

2016-06-12 Thread Daniel Prager
Cc:ing the list ... On Sun, Jun 12, 2016 at 4:56 PM, Ben Greenman wrote: > Yep, use `inst` to instantiate the polymorphic variables to sort. > > #lang typed/racket > > ((inst sort (List Symbol Integer) Integer) > '((a 45) (b 13) (c 12) (d 16) (e 9) (f 5)) < #:key

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread antoine
The program didn't type check for clause 2 if i change for 999 for instance and i see something no feedback in drracket when the program typecheck. I run racket 6.5 release and run 'raco pkg update --all' before testing, you both have probably a git version of typed-racket. Anyway it's great

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread Matthias Felleisen
Edit the program in DrRacket. If you mouse over the ] of the cond clause, you will see ‘ret in clauses 1 and 3 and nothing in clause 2. TR concluded that the result type is the empty set. You can even replace ‘ret in clause 2 with p or 999, and the program still type checks. Again, this

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread Sam Tobin-Hochstadt
Typed Racket warns about this at log level "warning". Do you see that for this program? Sam On Jun 12, 2016 1:32 PM, "antoine" wrote: Hello, 1 #lang typed/racket 2 3 (define-type Abc (U 'a 'b 'c)) 4 5 (define (test [p : Abc]) : 'ret 6 (case p 7 [('a 'b) 'ret]

[racket-users] Typed racket unreachable condition

2016-06-12 Thread antoine
Hello, 1 #lang typed/racket 2 3 (define-type Abc (U 'a 'b 'c)) 4 5 (define (test [p : Abc]) : 'ret 6 (case p 7 [('a 'b) 'ret] 8 [('z) 'ret] 9 [else 'ret])) This program type check, but the condition on line 8 is unreachable, is it possible for typed/racket to complain

Re: [racket-users] Potential small bugs on SEwPR

2016-06-12 Thread Leandro Facchinetti
Hi, all. Thanks for the feedback and for the acknowledgment on the Errata page. And thanks for answering my question about typesetting. I can confirm that I get small-caps using the provided snippet. Best. -- Leandro Facchinetti https://www.leafac.com GPG key: 3DF3D583 --