Skip to content
This repository

Removes the ambiguity-inducing ^ method from FunctorOps and FunctorSyntax #326

Merged
merged 1 commit into from over 1 year ago

2 participants

Kris Nuttycombe Lars Hupel
Kris Nuttycombe
Owner

This symbolic name for the map function is superfluous, and previously caused
ambiguity problems when functor syntax was imported from multiple locations, such as:

scala> import scalaz.syntax.traverse._
import scalaz.syntax.traverse._

scala> import scalaz.std.option._
import scalaz.std.option._

scala> ^(Option(1), Option(2)) { _ + _ }

which previously was a compilation error due to ambiguity, but which is now fine.

Kris Nuttycombe nuttycom Removes the ambiguity-inducing ^ method from FunctorOps and FunctorSy…
…ntax

This symbolic name for the map function is superfluous, and previously caused
ambiguity problems when functor syntax was imported from multiple locations, such as:

scala> import scalaz.syntax.traverse._
import scalaz.syntax.traverse._

scala> import scalaz.std.option._
import scalaz.std.option._

scala> ^(Option(1), Option(2)) { _ + _ }

which previously was a compilation error due to ambiguity, but which is now fine.
35a3301
Lars Hupel larsrh referenced this pull request
Closed

Backport pull requests and commits from 7.1.x to 7.0.1 #323

24 of 24 tasks complete
Lars Hupel larsrh merged commit 086f644 into from
Lars Hupel larsrh closed this
Kris Nuttycombe nuttycom referenced this pull request from a commit
Kris Nuttycombe nuttycom Removes the ambiguity-inducing ^ method from FunctorOps and FunctorSy…
…ntax

Cherry-picking pull request #326 (35a3301)
ddbdc92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Apr 08, 2013
Kris Nuttycombe nuttycom Removes the ambiguity-inducing ^ method from FunctorOps and FunctorSy…
…ntax

This symbolic name for the map function is superfluous, and previously caused
ambiguity problems when functor syntax was imported from multiple locations, such as:

scala> import scalaz.syntax.traverse._
import scalaz.syntax.traverse._

scala> import scalaz.std.option._
import scalaz.std.option._

scala> ^(Option(1), Option(2)) { _ + _ }

which previously was a compilation error due to ambiguity, but which is now fine.
35a3301
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 0 additions and 3 deletions. Show diff stats Hide diff stats

  1. +0 3  core/src/main/scala/scalaz/syntax/FunctorSyntax.scala
3  core/src/main/scala/scalaz/syntax/FunctorSyntax.scala
@@ -42,8 +42,6 @@ trait ToFunctorOps extends ToFunctorOps0 {
42 42 def lift(implicit F: Functor[F]) = F.lift(self)
43 43 }
44 44
45   - def ^[F[_],A,B](fa: F[A])(f: A => B)(implicit F: Functor[F]) = F(fa)(f)
46   -
47 45 implicit def ToFunctorIdV[A](v: A) = new FunctorIdV[A] { def self = v }
48 46
49 47 trait FunctorIdV[A] extends Ops[A] {
@@ -61,7 +59,6 @@ trait FunctorSyntax[F[_]] {
61 59 implicit def ToLiftV[A, B](v: A => B): LiftV[A, B] = new LiftV[A, B] {
62 60 def self = v
63 61 }
64   - def ^[A, B](fa: F[A])(f: A => B) = F(fa)(f)
65 62
66 63 trait LiftV[A,B] extends Ops[A => B] {
67 64 def lift = F.lift(self)

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.