[racket] TR error message

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Wed Sep 22 08:08:45 EDT 2010

On Wed, Sep 22, 2010 at 7:54 AM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> Thanks!  If I call < w/ three args I get the same output.  Shouldn't I
> see three per line?  Or should I read it as "The last line subsumes
> that case, the other lines indicate cases in which the optimizer can
> work -- ie, there's no optimization options at all for the three-arg
> case"?

Here I want to reiterate something that Vincent said, which is that
all of these clauses are just part of the type system, not the
optimizer.  They enable the type system to know more things about the
arguments, and when the type system knows more, the optimizer can do
better.  But this is just the type system, and as Vincent's example
showed up-thread, you can write a program that depends for
type-correctness on any one of these clauses.

As to the specific point, you should read it as "the last line
subsumes all the other cases, and the type doesn't provide as specific
information to the typechecker in the 3 (or 17) argument case as in
some 2 argument cases".  We could add even more cases to provide more
information (in cases with 3 arguments, in cases with Positive-Float,
etc,  but those haven't seemed important to us yet.
-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.