Haskell Foldable Wats

Edward Kmett ekmett at gmail.com
Thu Feb 25 12:01:06 UTC 2016


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 at feelingofgreen.ru>
wrote:

> David Feuer <david.feuer at gmail.com> 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,
> Косырев Сергей
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20160225/d51b76fc/attachment.html>


More information about the Libraries mailing list