24 lines
702 B
Forth
24 lines
702 B
Forth
namespace WoofWorkflows
|
|
|
|
type StepDag<'a, 'plat> = private | StepDag
|
|
type SealedStepDag<'a, 'plat> = private | SealedStepDag
|
|
|
|
type Step<'a> = private | Step
|
|
|
|
type Comp<'a> = private | Thunk of (unit -> 'a)
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module Comp =
|
|
let make (x : 'a) : Comp<'a> = Thunk (fun () -> x)
|
|
|
|
let force (x : 'a Comp) =
|
|
match x with
|
|
| Thunk x -> x ()
|
|
|
|
[<RequireQualifiedAccess>]
|
|
module StepDag =
|
|
|
|
let empty<'a, 'plat> (v : 'a) : StepDag<'a, 'plat> = StepDag
|
|
let addStep (name : string) (step : 'a Step) (cont : 'a -> StepDag<'b, 'plat>) : StepDag<'b, 'plat> = failwith ""
|
|
let seal<'a, 'plat> (s : StepDag<'a, 'plat>) : SealedStepDag<'a, 'plat> = SealedStepDag
|