sbt/tasks/Node.scala

21 lines
462 B
Scala
Raw Normal View History

/* sbt -- Simple Build Tool
* Copyright 2010 Mark Harrah
*/
2010-05-31 03:14:18 +02:00
package sbt
import Types._
2011-11-20 05:56:30 +01:00
/** Represents a task node in a format understood by the task evaluation engine Execute.
*
* @tparam A the task type constructor
2011-11-20 05:56:30 +01:00
* @tparam T the type computed by this node */
2010-05-31 03:14:18 +02:00
trait Node[A[_], T]
{
type K[L[x]]
val in: K[A]
val alist: AList[K]
2010-05-31 03:14:18 +02:00
2011-11-20 05:56:30 +01:00
/** Computes the result of this task given the results from the inputs. */
def work(inputs: K[Result]): Either[A[T], T]
2010-05-31 03:14:18 +02:00
}