Skip to content

Commit

Permalink
eleminate the trait TryInstances to fix #263
Browse files Browse the repository at this point in the history
  • Loading branch information
ghxiao authored and antonkulaga committed May 24, 2015
1 parent d81b056 commit ab402a3
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 38 deletions.
4 changes: 0 additions & 4 deletions project/Dependencies.scala
Expand Up @@ -23,10 +23,6 @@ object Dependencies {
*/
// Todo: %%%! --> %%%
val scalaz_js = Seq(libraryDependencies += "com.github.japgolly.fork.scalaz" %%%! "scalaz-core" % "7.1.1-2")
<<<<<<< HEAD
//val scalaz_js = Seq(libraryDependencies += "com.github.inthenow" %%%! "scalaz-core" % "7.1.0-4")
=======
>>>>>>> 963fc71... updated dependencies + movement to CommonBuild to fix the build issue

/**
* joda-Time
Expand Down
13 changes: 0 additions & 13 deletions project/build.scala
Expand Up @@ -34,11 +34,7 @@ object BananaRdfBuild extends Build {
import BuildSettings._
import Dependencies._

<<<<<<< HEAD
val crossBuildType = CommonBaseBuild
=======
val crossBuildType = CommonBaseBuild
>>>>>>> 963fc71... updated dependencies + movement to CommonBuild to fix the build issue

/** `banana`, the root project. */
lazy val bananaM = CrossModule(RootBuild,
Expand Down Expand Up @@ -193,16 +189,10 @@ object BananaRdfBuild extends Build {

lazy val sesame = sesameM
.project(Jvm)
<<<<<<< HEAD
.settings(aggregate in Test in rdf_jvm := false,
aggregate in Test in ntriples_jvm := false,
aggregate in Test in rdfTestSuite_jvm := false)
.settings(
Seq(
=======
.settings(buildSettings:_*)
.settings(
>>>>>>> 963fc71... updated dependencies + movement to CommonBuild to fix the build issue
libraryDependencies += sesameQueryAlgebra,
libraryDependencies += sesameQueryParser,
libraryDependencies += sesameQueryResult,
Expand Down Expand Up @@ -259,11 +249,8 @@ object BananaRdfBuild extends Build {
lazy val plantain_common_js = plantainM
.project(Js, Shared)
.settings(scalaz_js ++ zcheckJs:_*)
<<<<<<< HEAD
.settings(aggregate in Test in rdf_js := false,
aggregate in Test in rdfTestSuite_js := false)
=======
>>>>>>> 963fc71... updated dependencies + movement to CommonBuild to fix the build issue
.dependsOn(rdf_js , rdfTestSuite_js % "test-internal->compile")

/** `N3.js`, a js only module binding N3.js into banana-rdf abstractions. */
Expand Down
5 changes: 0 additions & 5 deletions project/plugins.sbt
Expand Up @@ -4,11 +4,6 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")

addSbtPlugin("com.github.inthenow" % "sbt-scalajs" % "0.6.2")

<<<<<<< HEAD
=======
dependencyOverrides += "org.scala-js" % "sbt-scalajs" % "0.6.3"

>>>>>>> 963fc71... updated dependencies + movement to CommonBuild to fix the build issue
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.1")
Expand Down
Expand Up @@ -3,10 +3,6 @@ package org.w3.banana.binder
import com.inthenow.zcheck.SpecLite
import org.w3.banana._, syntax._, diesel._
import scala.util._
<<<<<<< HEAD
import com.inthenow.zcheck.SpecLite
=======
>>>>>>> 963fc71... updated dependencies + movement to CommonBuild to fix the build issue

class CommonBindersTest[Rdf <: RDF](implicit ops: RDFOps[Rdf]) extends SpecLite {

Expand Down
Expand Up @@ -4,17 +4,13 @@ package util
import scalaz.{ Monad, Comonad }
import scala.util.Try

trait TryInstances {

implicit val tryInstance: Monad[Try] with Comonad[Try] = new Monad[Try] with Comonad[Try] {
object tryInstances {
implicit final val TryInstance = new Monad[Try] with Comonad[Try] {
def point[A](a: => A): Try[A] = Try(a)
def bind[A, B](fa: Try[A])(f: A => Try[B]): Try[B] = fa flatMap f
override def map[A, B](fa: Try[A])(f: A => B): Try[B] = fa map f
def cobind[A, B](fa: Try[A])(f: Try[A] => B): Try[B] = Try(f(fa))
override def cojoin[A](a: Try[A]): Try[Try[A]] = Try(a)
def copoint[A](p: Try[A]): A = p.get
}

}

object tryInstances extends TryInstances
6 changes: 0 additions & 6 deletions sesame/src/main/scala/org/w3/banana/sesame/SesameOps.scala
Expand Up @@ -158,12 +158,6 @@ class SesameOps extends RDFOps[Sesame] with SesameMGraphOps with DefaultURIOps[S
}

// graph isomorphism

/**
* the new ModelUtil.equals changed its semantics. See
* - https://openrdf.atlassian.net/browse/SES-1695
* - https://groups.google.com/forum/#!topic/sesame-devel/CGFDn7mESLg/discussion
*/
def isomorphism(left: Sesame#Graph, right: Sesame#Graph): Boolean = {
val leftNoContext = left.asScala.map(s => makeTriple(s.getSubject, s.getPredicate, s.getObject)).asJava
val rightNoContext = right.asScala.map(s => makeTriple(s.getSubject, s.getPredicate, s.getObject)).asJava
Expand Down

0 comments on commit ab402a3

Please sign in to comment.