On Mon, May 11, 2015 at 04:01:15PM -0400, Asumu Takikawa wrote:
> On 2015-05-11 14:33:51 -0400, Benjamin Greenman wrote:
> >    This program gives a confusing error message. Does anyone know why the
> >    "xs" in the body doesn't have type "(List Foo)"? 
> 
> It's because the type `Foo` is not defined, so it cannot have a sensible
> representation. Erroneous types like this `Foo` are turned into `Error` 
> (unless
> the error stops the type-checker).
> 
> Error does not propagate (i.e., (Listof Error) != Error) so you can get weird
> error messages like this.
> 
> ;;;
> 
> Maybe we should consider just terminating the typechecker when it hits
> undefined types (or other malformed types) instead of trying to continue?

No. Don't terminate the type checker -- it can still be useful to find 
*other* errors that do not depend on the malformed type.

I think the answer needs to be a little more subtle.

For example, if Foo is an undefined type, it can still be useful to 
report an error if one tries to multiply a list of Foo by 7.
But once the undefinedness of Foo has been reported, it probably isn't 
useful to flag as an error an attempt multiply a Foo by 7.

-- hendrik

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