Re: [racket-dev] typed racket non-monotonic in scary way?

2012-09-07 Thread Neil Toronto
On 09/07/2012 06:42 PM, John Clements wrote: I was trying to write a function on natural numbers today, and came up with an example that scares me all to bits. This program: #lang typed/racket (: int->nat (Natural -> Natural)) (define (int->nat n) (cond [(<= n 0) 13] [else (- n 1)]

[racket-dev] typed racket non-monotonic in scary way?

2012-09-07 Thread John Clements
I was trying to write a function on natural numbers today, and came up with an example that scares me all to bits. This program: #lang typed/racket (: int->nat (Natural -> Natural)) (define (int->nat n) (cond [(<= n 0) 13] [else (- n 1)])) Does not type-check, because (- n 1) has type

Re: [racket-dev] racket/format

2012-09-07 Thread Ryan Culpepper
The change to ~a, ~v, and ~s seems reasonable to me. The renamed keywords and generalization of ~v and ~s to multiple arguments are good. The ~r function seems okay except for the way it chooses which notation (positional or exponential) to use. It should take a rule, not an answer, and the de

[racket-dev] racket/format

2012-09-07 Thread Matthew Flatt
I've added a `racket/format' library that is a revised version of Ryan's `unstable/cat'. It's re-exported by `racket', but not by `racket/base'. I think Ryan's library is a step in the right direction for string formatting, and the difficult remaining task is getting the names right. So, this `rac