All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scales.xml.impl.EqualsHelpers.scala Maven / Gradle / Ivy

The newest version!
package scales.xml.impl

import scalaz.Equal._
import scalaz._
import Scalaz._

/**
 * Needed to help with cyclic issues in multi threaded MODULE$ access, after startup no problem, but we can't gaurantee that.
 */ 
object EqualsHelpers extends scales.xml.equals.DefaultQNameEquals {
  
  import scales.xml.{Attribute, QName, AttributeQName}
  
  // only used for default attribute comparisoms in Attributes
  implicit val aqnameEqual = equal { (a: Attribute, b: Attribute) => a.name =:= b.name }
  implicit val qnameEquiv : scales.utils.Equiv[QName] = new scales.utils.Equiv[QName]
  implicit def toQName(attribQName: AttributeQName): QName = attribQName.asInstanceOf[QName] // otherwise it blows the stack calling itself
  implicit val toQNameF = (a: Attribute) => { a.name : QName }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy