|
@@ -503,19 +503,9 @@ let make_pass ctx f = f
|
|
let enter_field_typing_pass g info =
|
|
let enter_field_typing_pass g info =
|
|
flush_pass g PConnectField info
|
|
flush_pass g PConnectField info
|
|
|
|
|
|
-let make_lazy ?(force=true) ctx t_proc f where =
|
|
|
|
- let r = ref (lazy_available t_dynamic) in
|
|
|
|
- r := lazy_wait (fun() ->
|
|
|
|
- try
|
|
|
|
- r := lazy_processing t_proc;
|
|
|
|
- let t = f () in
|
|
|
|
- r := lazy_available t;
|
|
|
|
- t
|
|
|
|
- with
|
|
|
|
- | Error e ->
|
|
|
|
- raise (Fatal_error e)
|
|
|
|
- );
|
|
|
|
- if force then delay ctx PForce (fun () -> ignore(lazy_type r));
|
|
|
|
|
|
+let make_lazy ctx t_proc f where =
|
|
|
|
+ let r = make_unforced_lazy t_proc f where in
|
|
|
|
+ delay ctx PForce (fun () -> ignore(lazy_type r));
|
|
r
|
|
r
|
|
|
|
|
|
let is_removable_field com f =
|
|
let is_removable_field com f =
|
|
@@ -893,7 +883,7 @@ let make_where ctx where =
|
|
let inf = ctx_pos ctx in
|
|
let inf = ctx_pos ctx in
|
|
where ^ " (" ^ String.concat "." inf ^ ")",inf
|
|
where ^ " (" ^ String.concat "." inf ^ ")",inf
|
|
|
|
|
|
-let make_lazy ?(force=true) ctx t f (where:string) =
|
|
|
|
|
|
+let make_lazy ctx t f (where:string) =
|
|
let r = ref (lazy_available t_dynamic) in
|
|
let r = ref (lazy_available t_dynamic) in
|
|
r := lazy_wait (make_pass ~inf:(make_where ctx where) ctx (fun() ->
|
|
r := lazy_wait (make_pass ~inf:(make_where ctx where) ctx (fun() ->
|
|
try
|
|
try
|
|
@@ -905,7 +895,7 @@ let make_lazy ?(force=true) ctx t f (where:string) =
|
|
| Error e ->
|
|
| Error e ->
|
|
raise (Fatal_error e)
|
|
raise (Fatal_error e)
|
|
));
|
|
));
|
|
- if force then delay ctx PForce (fun () -> ignore(lazy_type r));
|
|
|
|
|
|
+ delay ctx PForce (fun () -> ignore(lazy_type r));
|
|
r
|
|
r
|
|
|
|
|
|
*)
|
|
*)
|