Re: [racket-users] What are most type cases of `=` for?

2018-04-07 Thread Phil Nguyen
Oh I see!! Propositions were just omitted when pretty printed on my side. 
Thanks Sam!

-- 
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] What are most type cases of `=` for?

2018-04-07 Thread Sam Tobin-Hochstadt
Those cases all have non-trivial propositions. So this works, for example:

(: f : Negative-Integer Integer -> Negative-Integer)
(define (f x y)
  (if (= x y) y -5))

Sam

On Sat, Apr 7, 2018 at 3:15 AM, Phil Nguyen  wrote:
> The full type of `=` in Typed Racket has lots of cases, whose ranges are all
> `Boolean`. Are all cases before the default one `Number Number Number * ->
> Boolean` useful in any way, or they were just part of some automatic
> generation? It's not obvious to me that the preceding cases are useful,
> because they're all more specific in the domain.
>
> --
> 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] What are most type cases of `=` for?

2018-04-07 Thread Phil Nguyen
The full type of `=` in Typed Racket has lots of cases, whose ranges are 
all `Boolean`. Are all cases before the default one `Number Number Number * 
-> Boolean` useful in any way, or they were just part of some automatic 
generation? It's not obvious to me that the preceding cases are useful, 
because they're all more specific in the domain.

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