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 to know that typed/racket could handle those cases.

PS: i don't know how to see the log, just grep typed-racket package for make-logger and see only 'TR-optimizer topic put nothing to be writed to :/.

On 06/12/2016 07:42 PM, Matthias Felleisen wrote:
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 shows TR’s knowledge that the clause is about the empty set.

— Matthias




On Jun 12, 2016, at 1:32 PM, antoine <[email protected]> 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]
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 about it?

--
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 [email protected].
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to