equal
deleted
inserted
replaced
30 |
30 |
31 abstype 'a lazy = Lazy of 'a expr Synchronized.var |
31 abstype 'a lazy = Lazy of 'a expr Synchronized.var |
32 with |
32 with |
33 |
33 |
34 fun peek (Lazy var) = |
34 fun peek (Lazy var) = |
35 (case Synchronized.value var of |
35 (case Synchronized.peek var of |
36 Expr _ => NONE |
36 Expr _ => NONE |
37 | Result res => Future.peek res); |
37 | Result res => Future.peek res); |
38 |
38 |
39 fun lazy e = Lazy (Synchronized.var "lazy" (Expr e)); |
39 fun lazy e = Lazy (Synchronized.var "lazy" (Expr e)); |
40 fun value a = Lazy (Synchronized.var "lazy" (Result (Future.value a))); |
40 fun value a = Lazy (Synchronized.var "lazy" (Result (Future.value a))); |