Checking types of constructors defined in Prelude #143
Labels
error messages
Improving error messages provided to the programmer
proposal
New ideas that should be discussed, but not necessarily implemented
Some constructors are defined in Prelude, but used by some transformations (see
TypeInference.PreludeTypes
). Currently, the implementation doesn't check their types: it assumes that they are defined as usual. In extremely rare cases, these assumptions are not correct, which leads to "Internal type error" message, like in the following code:I'm not sure if this is a right design. Handling such cases correctly would require some complicated code, just to report an error that should be never seen by the casual programmer. The "Internal type error" in such rare cases seems to be good enough. On the other hand, I treat internal type errors as a tool for developers: when they occur, something is really bad in the DBL implementation. Assuming that our implementation is correct, the user should be not able to see such an error.
The text was updated successfully, but these errors were encountered: