2
0
Эх сурвалжийг харах

[typer] make LProcessing not a function

Simon Krajewski 1 жил өмнө
parent
commit
0e7d818218

+ 2 - 2
src/context/typecore.ml

@@ -466,7 +466,7 @@ 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 (fun() -> t_proc);
+			r := lazy_processing t_proc;
 			let t = f r in
 			r := lazy_available t;
 			t
@@ -935,7 +935,7 @@ let make_lazy ?(force=true) ctx t f (where:string) =
 	let r = ref (lazy_available t_dynamic) in
 	r := lazy_wait (make_pass ~inf:(make_where ctx where) ctx (fun() ->
 		try
-			r := lazy_processing (fun () -> t);
+			r := lazy_processing t;
 			let t = f r in
 			r := lazy_available t;
 			t

+ 3 - 3
src/core/tFunctions.ml

@@ -271,11 +271,11 @@ let add_descendant c descendant =
 
 let lazy_type f =
 	match !f with
-	| LAvailable t -> t
-	| LProcessing f | LWait f -> f()
+	| LAvailable t | LProcessing t -> t
+	| LWait f -> f()
 
 let lazy_available t = LAvailable t
-let lazy_processing f = LProcessing f
+let lazy_processing t = LProcessing t
 let lazy_wait f = LWait f
 
 let map loop t =

+ 1 - 1
src/core/tType.ml

@@ -83,7 +83,7 @@ and tmono_constraint_kind =
 
 and tlazy =
 	| LAvailable of t
-	| LProcessing of (unit -> t)
+	| LProcessing of t
 	| LWait of (unit -> t)
 
 and tsignature = (string * bool * t) list * t