![JAR search and dependency download from the Maven repository](/logo.png)
argonaut.CursorHistoryScalaz.scala Maven / Gradle / Ivy
The newest version!
package argonaut
import scalaz._
import std.list._
import syntax.equal._
import CursorOpScalaz._
object CursorHistoryScalaz extends CursorHistoryScalazs
trait CursorHistoryScalazs {
implicit val CursorHistoryInstances: Show[CursorHistory] & Equal[CursorHistory] & Monoid[CursorHistory] = {
new Show[CursorHistory] with Equal[CursorHistory] with Monoid[CursorHistory] {
override def show(h: CursorHistory) = Show[List[CursorOp]].show(h.toList)
def equal(h1: CursorHistory, h2: CursorHistory) = {
h1.toList === h2.toList
}
def zero = CursorHistory(List())
def append(h1: CursorHistory, h2: => CursorHistory) = {
CursorHistory(h1.toList ::: h2.toList)
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy