
On Fri, Mar 24, 2006 at 06:54:54PM +0000, Aaron Denney wrote:
Without breaking compatibility? But class instances become invalid if the hierarchy is modified.
No, compatibility will be broken. Hopefully not for most uses -- I don't think most people define new instances, and those that do will be able to do so more reasonably, so hopefully wouldn't mind.
The problem isn't with creating instances, it is with using the classes at all. well, in interfaces you are going to end up with some specific class or another concretely mentioned in your type signatures, which means you can't interact with code that only knows about the alternate class. like genericLength :: Integral a => [b] -> a if you have a different 'Integral' you can't call genericLength with it, or anything built up on genericLength. basically there would be no way for 'new' and 'old' polymorphic code to interact. the inability to evolve the class hierarchy is a serious issue, enough that it very well could be impractical for haskell' unless something like class aliases were widely adopted. John -- John Meacham - ⑆repetae.net⑆john⑈