sbt/tasks/Node.scala

24 lines
650 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.
2011-11-20 21:46:14 +01:00
* Heterogenous inputs (Mixed, tuple) and homogoneous (Uniform, sequence) are defined and consumed separately.
2011-11-20 05:56:30 +01:00
*
* @tparam A the task type
* @tparam T the type computed by this node */
2010-05-31 03:14:18 +02:00
trait Node[A[_], T]
{
type Mixed <: HList
type Uniform
2010-05-31 03:14:18 +02:00
val mixedIn: KList[A, Mixed]
val uniformIn: Seq[A[Uniform]]
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(mixed: KList[Result, Mixed], uniform: Seq[Result[Uniform]]): Either[A[T], T]
2010-05-31 03:14:18 +02:00
}