diff --git a/gwt/src/main/scala/org/specs2/specification/script/GWT.scala b/gwt/src/main/scala/org/specs2/specification/script/GWT.scala index 1e44884843..c2156265af 100644 --- a/gwt/src/main/scala/org/specs2/specification/script/GWT.scala +++ b/gwt/src/main/scala/org/specs2/specification/script/GWT.scala @@ -5,7 +5,7 @@ package script import core.{Env, Fragment, Fragments} import create.{FragmentFactory, FragmentsFactory} import shapeless.{HList, HNil, ::} -import shapeless.ops.hlist.ToList +import shapeless.ops.hlist.{ToTraversable, ToList} import execute._ import ResultLogicalCombinators._ import scalaz.syntax.std.list._ @@ -254,13 +254,8 @@ trait GWT extends StepParsers with Scripts { outer: FragmentsFactory => } - private implicit def toListAny[H <: HList]: ToList[H, Any] = new ToList[H, Any] { - def apply(l: H) = l match { - case head :: HNil => List(head) - case head :: tail => head :: tail.toList(toListAny) - case _ => List[Any]() - } - } + private implicit def toListAny[H <: HList]: ToList[H, Any] = + implicitly[ToTraversable.Aux[H, List, Any]] private def value(r: Result) = r match { case DecoratedResult(v, _) => v diff --git a/project/build.scala b/project/build.scala index 1645d92bdf..8eb0320359 100644 --- a/project/build.scala +++ b/project/build.scala @@ -47,7 +47,7 @@ object build extends Build { specs2ShellPrompt, scalaVersion := "2.11.6", scalazVersion := "7.1.1", - crossScalaVersions := Seq(scalaVersion.value, "2.10.4")) + crossScalaVersions := Seq(scalaVersion.value, "2.10.5")) lazy val specs2Version = settingKey[String]("defines the current specs2 version") @@ -82,7 +82,6 @@ object build extends Build { lazy val core = Project(id = "core", base = file("core"), settings = Seq( libraryDependencies ++= - depends.shapeless(scalaVersion.value) ++ depends.reflect(scalaVersion.value) ++ depends.paradise(scalaVersion.value) ++ depends.testInterface.map(_ % "optional") ++ diff --git a/project/depends.scala b/project/depends.scala index 4aab519ecf..d41c54af21 100644 --- a/project/depends.scala +++ b/project/depends.scala @@ -23,8 +23,8 @@ object depends { lazy val hamcrest = Seq("org.hamcrest" % "hamcrest-core" % "1.3") def shapeless(scalaVersion: String) = - if (scalaVersion.contains("2.11")) Seq("com.chuusai" %% "shapeless" % "2.0.0") - else Seq("com.chuusai" % ("shapeless_"+scalaVersion) % "2.0.0") + if (scalaVersion.contains("2.11")) Seq("com.chuusai" %% "shapeless" % "2.1.0") + else Seq("com.chuusai" % ("shapeless_"+scalaVersion) % "2.1.0") lazy val pegdown = Seq("org.pegdown" % "pegdown" % "1.2.1")