
It is actually quite fundamental. Instance resolution works on pattern matching on the type and we need all instances to be "global" and not able to be hidden or locally overridden to avoid coherence problems. There have been attempts to relax this restriction in the past, none of which are particularly satisfactory. * http://dspace.library.uu.nl/handle/1874/294072 is probably the most recent, but some are quite old. But basically all of them have run afoul of other ways to get "stuck" when resolving instances, or needing a vocabulary to track provenance of instances, or violate the open world assumptions. Scala's "implicits" break one way on this, Haskell breaks another. The moment you can even qualify the set of instances you get you lose safety for a lot of things like Data.Set, and many refactorings you can do to code today without care become fraught with danger. -Edward On Wed, Feb 24, 2016 at 6:14 PM, Kosyrev Serge <_deepfire@feelingofgreen.ru> wrote:
David Feuer
writes: Haskell's notion of Functor is in fact somewhat arbitrary from the standpoint of mathematical functors. It's not at all arbitrary from the standpoint of the general variety of type system Haskell uses.
This fact that we can't partially apply a type constructor in an arbitrary way -- is it really all that fundamental to the Haskell type system?
Is it truly something more than an implementation detail?
If so, why?
-- с уважениeм / respectfully, Косырев Сергей