[racket] TR error message

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Tue Sep 21 21:01:27 EDT 2010

I have a function that consumes two Number's and tries to compare them
using <=.  Rightfully, TR gives a type error.  The message says:

Type Checker: No function domains matched in function application:
Domains: Fixnum Zero
         Integer Zero
         Positive-Fixnum Fixnum
         Nonnegative-Fixnum Fixnum
         Exact-Positive-Integer Fixnum
         Exact-Nonnegative-Integer Fixnum
         Exact-Positive-Integer Integer
         Exact-Nonnegative-Integer Integer
         Nonnegative-Float Float
         Float Nonnegative-Float
         Real Real Real *
Arguments: Complex Complex

I've never tried to look closely at the "not a comparable number"
error message before (which, btw, would be a really awesome error
message to give for <, <=, etc.), but now that I do do so, I don't
quite understand it.

Are the two things on each line meant to be possible argument types
for each position of <=?  If so why are many of the combinations
missing?  If not, why do some (eg, "Fixnum") appear so many times?

I just don't know how to read the above error.


Posted on the users mailing list.