scalaz/scalaz — pull request #759 by Blaisorblade (2014-06-28 17:03:19+00:00)
Title: Add implicit conversions from Scala's <:</=:= to Scalaz's Liskov/Leibniz.

[Don't merge yet.]

Something like this would minimize breakage from fixing #649. If this does what we want, I could finish it up and add tests.

I prioritized the new instance below the other ones to avoid ambiguity, but I didn't manage to confirm that ambiguity would happen yet — suggesting I'm missing something — see a76bc0936b3cdfa672c3bd53a998f09eb45defef.
------

I also added Liskov/Leibniz.apply for typeclass instance lookup — I assume they were just forgotten.

Here's an example REPL session with this — a few things are still not perfect. For instance, why are the type alias only inside `Liskov._`? Can I move them to scalaz._? (There's a commit doing that now).

It'd also be consistent to make A <~< B a synonym of Liskov[A, B] also at the value level (same for Leibniz).

```scala
cala> import scalaz._
import scalaz._

scala> import Scalaz._
import Scalaz._

scala> Liskov[None.type, Option[Int]]
res0: scalaz.Liskov.<~<[None.type,Option[Int]] = scalaz.LiskovFunctions$$anon$3@5ff2e297

scala> import Liskov._
import Liskov._

scala> def f[A, B >: A](implicit p: A <:< B): A <~< B = implicitly[A <~< B]
f: [A, B >: A](implicit p: <:<[A,B])scalaz.Liskov.<~<[A,B]

scala> def f2[A, B](implicit p: A <:< B): A <~< B = implicitly[A <~< B]
f2: [A, B](implicit p: <:<[A,B])scalaz.Liskov.<~<[A,B]

scala> def f2[A, B](implicit p: A <:< B): A <~< B = Liskov[A, B]
f2: [A, B](implicit p: <:<[A,B])scalaz.Liskov.<~<[A,B]

scala> def f[A, B >: A](implicit p: A <:< B): A <~< B = Liskov[A, B]
f: [A, B >: A](implicit p: <:<[A,B])scalaz.Liskov.<~<[A,B]

scala> implicit def from_<:<[A, B](implicit lt: A <:< B): A <~< B =
| force
from_$less$colon$less: [A, B](implicit lt: <:<[A,B])scalaz.Liskov.<~<[A,B]

scala> implicit def isa[A, B >: A]: A <~< B = Liskov.isa[A, B]
isa: [A, B >: A]=> scalaz.Liskov.<~<[A,B]

scala> def f2[A, B](implicit p: A <:< B): A <~< B = Liskov[A, B]
f2: [A, B](implicit p: <:<[A,B])scalaz.Liskov.<~<[A,B]

```