Skip to content

Commit a56e2af

Browse files
vouillonhhugo
authored andcommitted
Fix WAT debug output
The helper functions for partial application where written twice.
1 parent 5e75c06 commit a56e2af

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

compiler/lib-wasm/curry.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ module Make (Target : Target_sig.S) = struct
359359
}
360360

361361
let f ~context =
362+
let context = { context with other_fields = context.other_fields } in
362363
IntMap.iter
363364
(fun arity name ->
364365
let f = apply ~context ~arity ~name in
@@ -388,5 +389,6 @@ module Make (Target : Target_sig.S) = struct
388389
(fun arity name ->
389390
let f = dummy ~context ~cps:true ~arity ~name in
390391
context.other_fields <- f :: context.other_fields)
391-
context.cps_dummy_funs
392+
context.cps_dummy_funs;
393+
context
392394
end

compiler/lib-wasm/curry.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
*)
1818

1919
module Make (_ : Target_sig.S) : sig
20-
val f : context:Code_generation.context -> unit
20+
val f : context:Code_generation.context -> Code_generation.context
2121
end

compiler/lib-wasm/generate.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ module Generate (Target : Target_sig.S) = struct
14421442
toplevel_name, js_code
14431443

14441444
let output ~context =
1445-
Curry.f ~context;
1445+
let context = Curry.f ~context in
14461446
let imports =
14471447
List.concat
14481448
(List.map

0 commit comments

Comments
 (0)