[bitc-dev] Type Classes and conflicting instantiations
Jonathan S. Shapiro
shap at eros-os.org
Fri Jul 22 21:37:07 EDT 2005
Since I know that you are going on vacation shortly, I will try to
restrict myself to a short list of questions that can be answered very
Based on the reading I have done and your (helpful!) comments in these
emails, I have formed two incompatible impressions:
1. (From Reading): It is an error to have two instantiations for a type
class that instantiate that class over the same types. That is, given a
single-parameter type class (TC 'a), it is an error to have two
instantiations of that type class that both instantiate (TC char).
2. (From your email): It is sufficient to make typing decisions based on
what is in scope at the moment you infer the type.
How do these two statements interact? I could take them to mean either:
a) It is an error to have have two instantiations of (TC char) that
are simultaneously in scope, OR
b) The rule is a whole-program rule, and it is an error to have two
instantiations of (TC char) even if they are never simultaneously
Question: Which interpretation is correct?
More information about the bitc-dev