global settings preparation: separate compilation/loading stages of Eval

This commit is contained in:
Mark Harrah 2011-07-09 16:54:41 -04:00
parent 8d778b72ed
commit a6f7e9840c
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ trait TypeFunctions
final val right = new (Id ~> P1of2[Right, Nothing]#Apply) { def apply[T](t: T) = Right(t) }
final val some = new (Id ~> Some) { def apply[T](t: T) = Some(t) }
final def idFun[T] = (t: T) => t
final def const[A,B](b: B): A=> B = _ => b
def nestCon[M[_], N[_], G[_]](f: M ~> N): (M G)#l ~> (N G)#l =
f.asInstanceOf[(M G)#l ~> (N G)#l] // implemented with a cast to avoid extra object+method call. castless version: