2010-06-01 14:38:56 +02:00
|
|
|
/* 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]
|
|
|
|
|
{
|
2010-06-25 00:09:07 +02:00
|
|
|
type Mixed <: HList
|
2010-06-10 14:17:51 +02:00
|
|
|
type Uniform
|
2010-05-31 03:14:18 +02:00
|
|
|
|
2010-06-25 00:09:07 +02:00
|
|
|
val mixedIn: KList[A, Mixed]
|
2010-06-10 14:17:51 +02:00
|
|
|
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. */
|
2010-06-25 00:09:07 +02:00
|
|
|
def work(mixed: KList[Result, Mixed], uniform: Seq[Result[Uniform]]): Either[A[T], T]
|
2010-05-31 03:14:18 +02:00
|
|
|
}
|