Thu, 13 Jun 2002 08:02:48 +1200
From: "Cagdas Ozgenc" <email@example.com>
| What happens if a type is made an instance of a typeclass in two
| different modules with different implementations?
That's OK, provided that the two instance declarations are never in
scope together, i.e. neither of the modules imports the other, and no
third module imports both of them.
| In static linking scenarios it will be caught by the compiler. I
| don't know whether we can do dynamic loading in Haskell, but it
| seems there will be inconsistencies in that case. Even in static
| linking when an object is serialized over the wire where a
| different implementation of a typeclass exists things will go
| wild. What's Haskell's approach to versioning?
I think the safety checks are made statically, even if dynamic loading
will occur later.