
scales.xml.equals.FromEqual.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scales-xml_2.11 Show documentation
Show all versions of scales-xml_2.11 Show documentation
An alternate Scala Xml processing library
The newest version!
package scales.xml.equals
import scalaz.Equal
import Equal._
trait FromEqualsImplicit {
/**
* An implicit but its only purpose is to convert, and needs the given comparison to function, which is provided (or not) by ScalesXml.
*/
implicit def fromCompToEq[T](implicit comp : XmlComparison[T]) : Equal[T] =
equal {
( a : T, b : T) =>
comp.compare(false, ComparisonContext.empty, a, b).isEmpty
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy