scalaz/scalaz — pull request #811 by ceedubs (2014-09-10 00:36:17+00:00)
Title: Add Functor.widen

I have implemented this via `map` and `Liskov.apply`. In many cases,
we could probably cheat by using `Liskov.subst` along with a variance
hack (such as in `IList.widen`) or `asInstanceOf`, which may be more
performant than using `map`. However, this would be a dirty hack, and
usually those are accompanied with bugs.

Can anyone recommend a safe yet more performant way to write this
generally? If not, we probably will want to consider overriding the
implementation for more instances for the sake of performance. At this
point I have only overridden the implementation for `IList`.