diff --git a/util/collection/HList.scala b/util/collection/HList.scala index db2c9db85..df0391de8 100644 --- a/util/collection/HList.scala +++ b/util/collection/HList.scala @@ -13,12 +13,16 @@ sealed trait HNil extends HList { type Wrap[M[_]] = HNil def :+: [G](g: G): G :+: HNil = HCons(g, this) + + override def toString = "HNil" } object HNil extends HNil final case class HCons[H, T <: HList](head : H, tail : T) extends HList { type Wrap[M[_]] = M[H] :+: T#Wrap[M] def :+: [G](g: G): G :+: H :+: T = HCons(g, this) + + override def toString = head + " :+: " + tail.toString } object HList diff --git a/util/collection/KList.scala b/util/collection/KList.scala index 81ef6afcd..aa9662917 100644 --- a/util/collection/KList.scala +++ b/util/collection/KList.scala @@ -31,6 +31,8 @@ final case class KCons[H, T <: HList, +M[_]](head: M[H], tail: KList[M,T]) exten def toList = head :: tail.toList def combine[N[X] >: M[X]]: (H :+: T)#Wrap[N] = HCons(head, tail.combine) + + override def toString = head + " :^: " + tail.toString } sealed class KNil extends KList[Nothing, HNil] @@ -40,6 +42,7 @@ sealed class KNil extends KList[Nothing, HNil] def :^: [M[_], H](h: M[H]) = KCons(h, this) def toList = Nil def combine[N[X]] = HNil + override def toString = "KNil" } object KNil extends KNil