diff --git a/.travis.yml b/.travis.yml index 1867eb8..e5ed8d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,25 +4,13 @@ matrix: include: # scala 2.10 - jdk: oraclejdk8 - scala: 2.10.6 - env: SCALAZ_VERSION=7.1.11 - - jdk: oraclejdk8 - scala: 2.10.6 - env: SCALAZ_VERSION=7.2.7 + scala: 2.10.7 # scala 2.11 - jdk: oraclejdk8 - scala: 2.11.8 - env: SCALAZ_VERSION=7.1.11 - - jdk: oraclejdk8 - scala: 2.11.8 - env: SCALAZ_VERSION=7.2.7 + scala: 2.11.12 # scala 2.12 - jdk: oraclejdk8 - scala: 2.12.1 - env: SCALAZ_VERSION=7.1.11 - - jdk: oraclejdk8 - scala: 2.12.1 - env: SCALAZ_VERSION=7.2.7 + scala: 2.12.4 branches: only: diff --git a/codecs/build.sbt b/codecs/build.sbt index 9bbe47f..060807e 100644 --- a/codecs/build.sbt +++ b/codecs/build.sbt @@ -1,14 +1,3 @@ -scalaCheckVersion := { - scalazVersion.value match { - case VersionNumber(Seq(7, 2, _*), _, _) => "1.12.6" - case VersionNumber(Seq(7, 1, _*), _, _) => - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n <= 11 => "1.11.4" - case Some((2, n)) => "1.11.6" - } - } -} - resolvers += Resolver.sonatypeRepo("releases") libraryDependencies += "org.scodec" %% "scodec-core" % "1.10.3" diff --git a/codecs/src/main/scala/GraphCodecs.scala b/codecs/src/main/scala/GraphCodecs.scala index 594601d..841a794 100644 --- a/codecs/src/main/scala/GraphCodecs.scala +++ b/codecs/src/main/scala/GraphCodecs.scala @@ -17,9 +17,6 @@ package quiver import scodec._ -import scodec.bits._ -import shapeless._ -import scalaz.\/ object GraphCodecs { diff --git a/codecs/src/test/scala/GraphCodecsTest.scala b/codecs/src/test/scala/GraphCodecsTest.scala index 7e0621a..6514b1f 100644 --- a/codecs/src/test/scala/GraphCodecsTest.scala +++ b/codecs/src/test/scala/GraphCodecsTest.scala @@ -20,7 +20,6 @@ import org.scalacheck._ import org.scalacheck.Prop._ import scodec.codecs import scodec.Attempt -import scalaz.\/ object GraphCodecsTest extends Properties("codecs"){ import GraphGen.{arbitraryNode,arbitraryEdge,arbitraryGraph} diff --git a/core/build.sbt b/core/build.sbt index 742f711..94e3b4b 100644 --- a/core/build.sbt +++ b/core/build.sbt @@ -1,17 +1,9 @@ -scalaCheckVersion := { - scalazVersion.value match { - case VersionNumber(Seq(7, 2, _*), _, _) => "1.12.6" - case VersionNumber(Seq(7, 1, _*), _, _) => - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, n)) if n <= 11 => "1.11.4" - case Some((2, n)) => "1.11.6" - } - } -} +val CatsVersion = "1.0.0-RC2" libraryDependencies ++= Seq( - "org.scalaz" %% "scalaz-core" % scalazVersion.value, - "org.scalaz" %% "scalaz-scalacheck-binding" % scalazVersion.value % "test" + "org.typelevel" %% "cats-free" % CatsVersion, + "org.typelevel" %% "cats-laws" % CatsVersion % "test", + "com.github.alexarchambault" %% "scalacheck-shapeless_1.13" % "1.1.7" % "test" ) scalacOptions in (Compile,doc) := Seq("-groups", "-implicits") diff --git a/core/src/main/scala/Context.scala b/core/src/main/scala/Context.scala index 8178b19..f8c4518 100644 --- a/core/src/main/scala/Context.scala +++ b/core/src/main/scala/Context.scala @@ -67,4 +67,3 @@ case class GrContext[N,A,B](inAdj: Map[N, Set[B]], outAdj: Map[N, Set[B]]) { def toContext(v: N): Context[N,A,B] = Context(toAdj(inAdj), v, label, toAdj(outAdj)) } - diff --git a/core/src/main/scala/Decomp.scala b/core/src/main/scala/Decomp.scala index b6ef33e..2593f47 100644 --- a/core/src/main/scala/Decomp.scala +++ b/core/src/main/scala/Decomp.scala @@ -16,7 +16,7 @@ //: ---------------------------------------------------------------------------- package quiver -import scalaz.Comonad +import cats.Comonad /** * The decomposition of a graph into possibly a detached context focused on one node, @@ -132,9 +132,9 @@ object GDecomp { implicit def gDecompComonad[N,B]: Comonad[({type λ[α] = GDecomp[N,α,B]})#λ] = new Comonad[({type λ[α] = GDecomp[N,α,B]})#λ] { - def copoint[A](as: GDecomp[N,A,B]) = as.label + def extract[A](as: GDecomp[N,A,B]) = as.label def map[A,C](as: GDecomp[N,A,B])(f: A => C) = as map f - def cobind[A,C](as: GDecomp[N,A,B])(f: GDecomp[N,A,B] => C) = + def coflatMap[A,C](as: GDecomp[N,A,B])(f: GDecomp[N,A,B] => C) = as redecorate f } } diff --git a/core/src/main/scala/Graph.scala b/core/src/main/scala/Graph.scala index ad85085..494a916 100644 --- a/core/src/main/scala/Graph.scala +++ b/core/src/main/scala/Graph.scala @@ -17,12 +17,8 @@ package quiver -import compatibility._ - -import scalaz._ -import scalaz.syntax.std.map._ -import scalaz.syntax.monoid._ -import scalaz.std.vector._ +import cats.Monoid +import cats.implicits._ case class Edge[N](from: N, to: N) @@ -324,7 +320,7 @@ case class Graph[N,A,B](rep: GraphRep[N,A,B]) { */ def updateNode(n: LNode[N,A]): Graph[N,A,B] = decomp(n.vertex) match { - case Decomp(Some(Context(p, v, l, s)), rest) => + case Decomp(Some(Context(p, _, _, s)), rest) => rest & Context(p, n.vertex, n.label, s) case _ => this } @@ -667,6 +663,7 @@ case class Graph[N,A,B](rep: GraphRep[N,A,B]) { */ def rdfs(vs: Seq[N]): Seq[N] = xdfsWith(vs, _.predecessors, _.vertex) + /* /** * Finds the transitive closure of this graph. * @group dfs @@ -725,8 +722,9 @@ case class Graph[N,A,B](rep: GraphRep[N,A,B]) { case Decomp(Some(c), g) => val (xs, g2) = g.xdfWith(d(c), d, f) val (ys, g3) = g.xdfWith(vs.tail, d, f) - (Tree.Node(f(c), xs.toStream) +: ys, g3) + (Cofree[Stream, C](f(c), Eval.later(xs.toStream)) +: ys, g3) } + */ import scala.collection.immutable.Queue @@ -906,7 +904,7 @@ case class Graph[N,A,B](rep: GraphRep[N,A,B]) { * @group bfs */ def cheapestPath[C : Monoid : math.Ordering](s: N, t: N, costFkt: (LNode[N,A],B,LNode[N,A]) => C): Option[LPath[N,B]] = { - def costOfPath(p: LPath[N,B]): C = p._2.foldLeft((LNode(p._1, label(p._1).get),mzero[C])){ + def costOfPath(p: LPath[N,B]): C = p._2.foldLeft((LNode(p._1, label(p._1).get), Monoid[C].empty)){ case ((last,cost),(n,edgeLabel)) => val next = LNode(n,label(n).get) val addedCost = costFkt(last,edgeLabel,next) diff --git a/core/src/main/scala/Tree.scala b/core/src/main/scala/Tree.scala new file mode 100644 index 0000000..e69de29 diff --git a/core/src/main/scala/package.scala b/core/src/main/scala/package.scala index 6b7d8fd..7942492 100644 --- a/core/src/main/scala/package.scala +++ b/core/src/main/scala/package.scala @@ -14,10 +14,9 @@ //: limitations under the License. //: //: ---------------------------------------------------------------------------- -import scalaz._ -import scalaz.syntax.std.map._ -import scalaz.syntax.monoid._ -import scalaz.std.vector._ + +import cats.{Monoid, Order} +import cats.implicits._ /** * @groupname creation Graph Construction @@ -81,42 +80,45 @@ package object quiver { /** @group instances */ implicit def nodeOrder[N,A](implicit N: Order[N], A: Order[A]): Order[LNode[N,A]] = - Order.order { (a, b) => - N.order(a.vertex, b.vertex) |+| A.order(a.label, b.label) - } + Order.whenEqual( + Order.by[LNode[N,A], N](_.vertex), + Order.by[LNode[N,A], A](_.label)) /** @group instances */ implicit def ledgeOrder[N,A](implicit N: Order[N], A: Order[A]): Order[LEdge[N,A]] = - Order.order { (a, b) => - N.order(a.from, b.from) |+| N.order(a.to, b.to) |+| A.order(a.label, b.label) - } + Order.whenEqualMonoid.combineAll(List( + Order.by(_.from), + Order.by(_.to), + Order.by(_.label))) /** @group instances */ implicit def edgeOrder[N,A](implicit N: Order[N]): Order[Edge[N]] = - Order.order { (a, b) => - N.order(a.from, b.from) |+| N.order(a.to, b.to) - } + Order.whenEqualMonoid.combineAll(List( + Order.by(_.from), + Order.by(_.to))) /** @group instances */ - implicit def graphOrder[N,A,B](implicit N: Order[N], A: Order[A], B: Order[B]): Order[Graph[N,A,B]] = - Order.order { (a, b) => - implicit val L = Order[LNode[N,A]].toScalaOrdering - implicit val E = Order[LEdge[N,B]].toScalaOrdering - Order[Vector[LNode[N,A]]].order(a.labNodes.sorted, b.labNodes.sorted) |+| - Order[Vector[LEdge[N,B]]].order(a.labEdges.sorted, b.labEdges.sorted) - } + implicit def graphOrder[N,A,B](implicit N: Order[N], A: Order[A], B: Order[B]): Order[Graph[N,A,B]] = { + implicit val L = Order[LNode[N,A]].toOrdering + implicit val E = Order[LEdge[N,B]].toOrdering + Order.whenEqual( + Order.by(_.labNodes.sorted), + Order.by(_.labEdges.sorted)) + } - implicit def contextOrder[N,A,B](implicit N: Order[N], A: Order[A], B: Order[B]): Order[Context[N,A,B]] = - Order.order { (a, b) => - import scalaz.std.vector._ - import scalaz.std.tuple._ - N.order(a.vertex, b.vertex) |+| A.order(a.label, b.label) |+| Order[Adj[N,B]].order(a.inAdj, b.inAdj) |+| Order[Adj[N,B]].order(a.outAdj, b.outAdj) - } + implicit def contextOrder[N,A,B](implicit N: Order[N], A: Order[A], B: Order[B]): Order[Context[N,A,B]] = { + implicit val adj = Order[(B, N)].toOrdering + Order.whenEqualMonoid.combineAll(List( + Order.by(_.vertex), + Order.by(_.label), + Order.by(_.inAdj.sorted), + Order.by(_.outAdj.sorted))) + } - implicit def gdecompOrder[N:Order,A:Order,B:Order]: Order[GDecomp[N,A,B]] = - Order.order { (a, b) => - contextOrder[N,A,B].order(a.ctx, b.ctx) |+| graphOrder[N,A,B].order(a.rest, b.rest) - } + implicit def gDecompOrder[N:Order,A:Order,B:Order]: Order[GDecomp[N,A,B]] = + Order.whenEqual( + Order.by[GDecomp[N,A,B], Context[N,A,B]](_.ctx), + Order.by[GDecomp[N,A,B], Graph[N,A,B]](_.rest)) /** * An empty graph @@ -253,7 +255,25 @@ package object quiver { * @group instances */ implicit def graphMonoid[N,A,B]: Monoid[Graph[N,A,B]] = new Monoid[Graph[N,A,B]] { - def zero = empty - def append(g1: Graph[N,A,B], g2: => Graph[N,A,B]) = g1 union g2 + def empty = quiver.empty + def combine(g1: Graph[N,A,B], g2: Graph[N,A,B]) = g1 union g2 + } + + // Map utilities lost when porting the old implementation + private[quiver] implicit class MapOps[A, B](val self: Map[A, B]) extends AnyVal { + def alter(k: A)(f: Option[B] => Option[B]): Map[A, B] = + f(self.get(k)) match { + case Some(v0) => self.updated(k, v0) + case None => self - k + } + + def insertWith(k: A, v: B)(f: (B, B) => B): Map[A, B] = + self.get(k) match { + case Some(v0) => self.updated(k, f(v0, v)) + case None => self.updated(k, v) + } + + def mapKeys[A1](f: A => A1): Map[A1, B] = + self.map { case (k, v) => f(k) -> v } } } diff --git a/core/src/main/scalaz-7.1/compatibility.scala b/core/src/main/scalaz-7.1/compatibility.scala deleted file mode 100644 index 1c9959a..0000000 --- a/core/src/main/scalaz-7.1/compatibility.scala +++ /dev/null @@ -1,27 +0,0 @@ -//: ---------------------------------------------------------------------------- -//: Copyright (C) 2017 Verizon. All Rights Reserved. -//: -//: Licensed under the Apache License, Version 2.0 (the "License"); -//: you may not use this file except in compliance with the License. -//: You may obtain a copy of the License at -//: -//: http://www.apache.org/licenses/LICENSE-2.0 -//: -//: Unless required by applicable law or agreed to in writing, software -//: distributed under the License is distributed on an "AS IS" BASIS, -//: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//: See the License for the specific language governing permissions and -//: limitations under the License. -//: -//: ---------------------------------------------------------------------------- -package quiver - -import scalaz.Tree -import scalaz.Tree.Node - -private[quiver] object compatibility { - implicit class TreeNodeObjectSyntax(val n: Node.type) extends AnyVal { - def apply[A](root: => A, forest: => Stream[Tree[A]]): Tree[A] = - Tree.node(root, forest) - } -} diff --git a/core/src/main/scalaz-7.2/compatibility.scala b/core/src/main/scalaz-7.2/compatibility.scala deleted file mode 100644 index 0f37f73..0000000 --- a/core/src/main/scalaz-7.2/compatibility.scala +++ /dev/null @@ -1,19 +0,0 @@ -//: ---------------------------------------------------------------------------- -//: Copyright (C) 2017 Verizon. All Rights Reserved. -//: -//: Licensed under the Apache License, Version 2.0 (the "License"); -//: you may not use this file except in compliance with the License. -//: You may obtain a copy of the License at -//: -//: http://www.apache.org/licenses/LICENSE-2.0 -//: -//: Unless required by applicable law or agreed to in writing, software -//: distributed under the License is distributed on an "AS IS" BASIS, -//: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//: See the License for the specific language governing permissions and -//: limitations under the License. -//: -//: ---------------------------------------------------------------------------- -package quiver - -private[quiver] object compatibility diff --git a/core/src/test/scala/GraphTests.scala b/core/src/test/scala/GraphTests.scala index 1338d4d..dcc1e85 100644 --- a/core/src/test/scala/GraphTests.scala +++ b/core/src/test/scala/GraphTests.scala @@ -16,11 +16,12 @@ //: ---------------------------------------------------------------------------- package quiver +import cats.Order +import cats.implicits._ +import cats.kernel.laws.discipline.MonoidTests +import cats.laws.discipline.ComonadTests import org.scalacheck._ import org.scalacheck.Prop._ -import scalaz._ -import Scalaz._ -import scalaz.scalacheck.ScalazProperties._ object GraphTests extends Properties("Graph") { type N = Byte @@ -67,8 +68,8 @@ object GraphTests extends Properties("Graph") { property("A graph constructed from nodes and edges should contain those nodes and edges") = forAll { (ns: List[N], es: List[LEdge[N,Int]], i: Int) => - implicit val NO = Order[LNode[N,Int]].toScalaOrdering - implicit val EO = Order[LEdge[N,Int]].toScalaOrdering + implicit val NO = Order[LNode[N,Int]].toOrdering + implicit val EO = Order[LEdge[N,Int]].toOrdering val nns = ns.toSet.toList.map((b: N) => LNode(b, i)).sorted val ees = es.toSet.toList.filter((x: LEdge[N,Int]) => ns.contains(x.from) && ns.contains(x.to) @@ -108,7 +109,6 @@ object GraphTests extends Properties("Graph") { property("BFS should find all descendants of a node") = forAll { (ns: List[LNode[N,Int]], l: Int) => val g = connect(ns, l) - val bfs = if (ns.isEmpty) Set() else g.bfs(ns.head.vertex).toSet ns.isEmpty || g.bfs(ns.head.vertex).toSet == ns.map(_.vertex).toSet } @@ -119,25 +119,20 @@ object GraphTests extends Properties("Graph") { g1.nodes.forall(u.nodes contains _) } - property("Graphs with union form a monoid") = - forAll { (g1: Graph[N,Int,Int], g2: Graph[N,Int,Int], g3: Graph[N,Int,Int]) => - graphMonoid.monoidLaw.associative(g1, g2, g3) - graphMonoid.monoidLaw.leftIdentity(g1) - graphMonoid.monoidLaw.rightIdentity(g1) - } + include(MonoidTests[Graph[N, Int, Int]].monoid.all) property("Union is commutative (ignoring labels)") = forAll { (g1: Graph[N,Int,Int], g2: Graph[N,Int,Int]) => val u1 = g1 union g2 val u2 = g2 union g1 - implicit val N = Order[Edge[N]].toScalaOrdering + implicit val N = Order[Edge[N]].toOrdering u1.edges.sorted == u2.edges.sorted && u1.nodes.sorted == u2.nodes.sorted } property("Folding on contexts equals folding on nodes and edges") = forAll { (g: Graph[N,Int,Int]) => (g.labNodes.map(_.label).sum, g.labEdges.map(_.label).sum) == g.fold((0,0)) { - case (Context(ins, v, a, outs), (accn, acce)) => + case (Context(ins, _, a, outs), (accn, acce)) => (a + accn, (ins ++ outs).map(_._1).sum + acce) } } @@ -147,7 +142,7 @@ object GraphTests extends Properties("Graph") { val g = safeMkGraph(ns, es) val vs = ns.map(_.vertex).toSet val roots = vs.filterNot(n => es.find { e => - e.to === n && vs.contains(e.from) && (e.from /== n) + e.to === n && vs.contains(e.from) && (e.from =!= n) }.isDefined) s"Found ${g.roots} expected ${roots}" |: g.roots === roots } @@ -157,10 +152,10 @@ object GraphTests extends Properties("Graph") { val g = safeMkGraph(ns, es) val vs = ns.map(_.vertex).toSet val leaves = vs.filterNot(n => es.find { e => - e.from === n && vs.contains(e.to) && (e.to /== n) + e.from === n && vs.contains(e.to) && (e.to =!= n) }.isDefined) s"Found ${g.leaves} expected ${leaves}" |: g.leaves === leaves - } + } property("The shortest path should be the cheapest path with constant cost") = forAll { (tpg: (Graph[N,Int,Int], LNode[N,Int], LNode[N,Int])) => @@ -171,9 +166,17 @@ object GraphTests extends Properties("Graph") { val cPath = graph.cheapestPath[Int](from, to, (f: LNode[N,Int], l: Int, t: LNode[N,Int]) => 1) s"Paths different: cheapest = $cPath, shortest = $sPath" |: sPath === cPath } + import GDecomp._ + import org.scalacheck.ScalacheckShapeless._ + + // TODO Clean these up, probably into a GraphCogen class. Keep the questionable ones hidden. + implicit def cogenMap[K: Cogen: Ordering, V: Cogen]: Cogen[Map[K, V]] = + Cogen.it(_.toVector.sortBy(_._1).iterator) + implicit def cogenContext[V: Cogen: Ordering, A: Cogen, B: Cogen: Ordering]: Cogen[Context[V, A, B]] = + Cogen[(V, GrContext[V, A, B])].contramap(c => c.vertex -> c.toGrContext) - property("GDecomp is a lawful comonad") = comonad.laws[({type λ[α] = GDecomp[Int,α,Int]})#λ] + include(ComonadTests[({type λ[α] = GDecomp[N,α,Int]})#λ].comonad[Int, Int, Int].all) property("The shortest path through a graph should be the shortest path between all subpaths") = forAll { (tpg: (Graph[N,Int,Int], LNode[N, Int], LNode[N, Int])) => @@ -183,7 +186,7 @@ object GraphTests extends Properties("Graph") { (for { path <- graph.esp(start.vertex, end.vertex).toVector subpath <- (1 until path.size).flatMap(path.sliding).toVector - shortest = (subpath.headOption |@| subpath.lastOption).apply(graph.esp) + shortest = (subpath.headOption, subpath.lastOption).mapN(graph.esp) } yield shortest.nonEmpty && shortest.get.nonEmpty && shortest.get.get == subpath).forall(identity) } diff --git a/project.sbt b/project.sbt index 7114c70..0db49a8 100644 --- a/project.sbt +++ b/project.sbt @@ -3,7 +3,7 @@ organization in Global := "io.verizon.quiver" scalaVersion in Global := crossScalaVersions.value.head -crossScalaVersions in Global := Seq("2.12.1", "2.11.8", "2.10.6") +crossScalaVersions in Global := Seq("2.12.4", "2.11.12", "2.10.7") scalacOptions in (Compile,doc) := Seq("-groups", "-implicits") diff --git a/project/ScalazPlugin.scala b/project/ScalazPlugin.scala deleted file mode 100644 index c9046f4..0000000 --- a/project/ScalazPlugin.scala +++ /dev/null @@ -1,80 +0,0 @@ -//: ---------------------------------------------------------------------------- -//: Copyright (C) 2017 Verizon. All Rights Reserved. -//: -//: Licensed under the Apache License, Version 2.0 (the "License"); -//: you may not use this file except in compliance with the License. -//: You may obtain a copy of the License at -//: -//: http://www.apache.org/licenses/LICENSE-2.0 -//: -//: Unless required by applicable law or agreed to in writing, software -//: distributed under the License is distributed on an "AS IS" BASIS, -//: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//: See the License for the specific language governing permissions and -//: limitations under the License. -//: -//: ---------------------------------------------------------------------------- -package verizon.build - -import sbt._, Keys._ - -object ScalazPlugin extends AutoPlugin { - object autoImport { - val scalazVersion = settingKey[String]("scalaz version") - val scalazCrossVersioner = settingKey[String => String]("modifies a version number according to scalaz version") - } - - import autoImport._ - - override def requires = RigPlugin - - override def trigger = allRequirements - - override lazy val projectSettings = Seq( - scalazVersion := sys.env.get("SCALAZ_VERSION").getOrElse("7.2.7"), - scalazCrossVersioner := scalazCrossVersioners.default(scalazVersion.value), - version := scalazCrossVersioner.value(version.value), - unmanagedSourceDirectories in Compile += (sourceDirectory in Compile).value / VersionNumber(scalazVersion.value).numbers.take(2).mkString("scalaz-", ".", "") - ) - - object scalazCrossVersioners { - /** - * Appends `-scalaz-X.Y` to the version number as a qualifier. For - * example, version 1.0.0 applied to scalaz-7.2.7 becomes `1.0.0-scalaz-7.2` - */ - def default(scalazVersion: String): String => String = - _ match { - case VersionNumber(numbers, tags, extras) => - val qualifier = scalazVersion match { - case VersionNumber(Seq(7, zMinor, _*), Seq(), _) => - s"scalaz-7.$zMinor" - case _ => - // - s"scalaz-$scalazVersion" - } - numbers.mkString(".") + (qualifier +: tags).mkString("-", "-", "") + extras.mkString("") - } - - def suffixed(scalazVersion: String)(suffixer: VersionNumber => String): String => String = - _ match { - case VersionNumber(numbers, tags, extras) => - val suffix = suffixer(VersionNumber(scalazVersion)) - numbers.mkString(".") + suffix + (tags match { - case Seq() => "" - case ts => ts.mkString("-", "-", "") - }) + extras.mkString("") - } - - /** - * This convention was started with scalaz-stream-0.8, and - * followed by certain versions of http4s, doobie, and argonaut. - * It is not recommended, as it breaks semantic versioning and - * `sbt.VersionNumber` parsing. - */ - def `scalaz-stream-0.8`(scalazVersion: String): String => String = - suffixed(scalazVersion) { - case VersionNumber(Seq(7, 2, _*), _, _) => "a" - case _ => "" - } - } -} diff --git a/project/plugins.sbt b/project/plugins.sbt index 51d015e..bbe7f1d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,8 @@ resolvers += Resolver.url( addSbtPlugin("io.verizon.build" % "sbt-rig" % "2.0.29") // docs -addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3") -addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.8") -addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2") +addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1") +addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3") +addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.3") +addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.8") +addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2") diff --git a/version.sbt b/version.sbt index c0c0702..b8b4128 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "6.0.0-SNAPSHOT" +version in ThisBuild := "7.0.0-SNAPSHOT"