Haskell Foldable Wats

Kosyrev Serge _deepfire at feelingofgreen.ru
Wed Feb 24 16:22:05 UTC 2016

Edward Kmett <ekmett at gmail.com> writes:
> You can wish for such an instance all you want, but it can't exist.
> The definition of Functor is forced on you by the a combination of the
> laws, and the way the type system works. You can't have this "other"
> instance even if you want it, even if the instance we have today
> wasn't there.
> (,) e :: * -> *
> That is a legal choice of 'f' for 
> class Functor f where
> fmap :: (a -> b) -> f a -> f b

I see where I made a mistake, yes.

Are you also saying that this cannot be resolved by some kind of a
type families-based type-level 'flip'?

с уважениeм / respectfully,
Косырев Сергей

More information about the Libraries mailing list