minor updates for p2

This commit is contained in:
Mark Harrah 2010-08-30 09:10:25 -04:00
parent dd8d58a9c0
commit 12336b79f6
1 changed files with 8 additions and 5 deletions

View File

@ -3,13 +3,16 @@
*/
package sbt
object Types extends TypeFunctions
object Types extends Types
{
val :^: = KCons
val :+: = HCons
type :+:[H, T <: HList] = HCons[H,T]
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]
}