|
|
|
|
|
by ratmice
2050 days ago
|
|
Seems like it, but typeclasses are inherently anti-modular,
they provide a globally coherent unique instance.
consider the Ord typeclass giving a single ordering for a specific type. To reverse the order you need to create a new type with a new instance of ord which reverses it. Where in a module system its perfectly fine to have multiple instances of Ord for a given type. One gives global consistency where the other gives local consistency. |
|