Files
sbt/util/collection/Types.scala
T
Mark Harrah 2bb2aed1f6 Revert "work around for 2.10. pattern matching on KNil now requires KNil()"
This reverts commit 2f726b34c3.

This commit caused "java.lang.Error: typeConstructor inapplicable for <none>" when running 'sxr'
2012-03-17 22:58:13 -04:00

19 lines
413 B
Scala

/* sbt -- Simple Build Tool
* Copyright 2010 Mark Harrah
*/
package sbt
object Types extends Types
{
implicit def hconsToK[M[_], H, T <: HList](h: M[H] :+: T)(implicit mt: T => KList[M, T]): KList[M, H :+: T] =
KCons[H, T, M](h.head, mt(h.tail) )
implicit def hnilToK(hnil: HNil): KNil = KNil
}
trait Types extends TypeFunctions
{
val :^: = KCons
val :+: = HCons
type :+:[H, T <: HList] = HCons[H,T]
}