This commit is contained in:
Smaug123
2023-12-22 12:38:35 +00:00
parent 7bbb0cbdef
commit 00a360a2dc
3 changed files with 79 additions and 87 deletions

View File

@@ -5,13 +5,12 @@ type SealedStepDag<'a, 'plat> = private | SealedStepDag
type Step<'a> = private | Step
type Comp<'a> =
private
| Thunk of (unit -> 'a)
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 ()
@@ -20,7 +19,5 @@ module Comp =
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 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