From 814c04c1d019b065ee1c33535ae3c68a86380af6 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 15 Dec 2023 19:17:29 +0100 Subject: [PATCH] infinite loop.... --- flap/src/fopix/hobixToFopix.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flap/src/fopix/hobixToFopix.ml b/flap/src/fopix/hobixToFopix.ml index aaf4a17..59a4426 100644 --- a/flap/src/fopix/hobixToFopix.ml +++ b/flap/src/fopix/hobixToFopix.ml @@ -235,11 +235,12 @@ let translate (p : S.t) env = let bfs, b = expression env b in let cfs, c = expression env c in afs @ bfs @ cfs, T.IfThenElse (a, b, c) - | S.Fun (x, e) -> + | S.Fun (x, e) as f -> let fname = make_fresh_function_identifier () in let x = List.map identifier x in let efs, e = expression env e in - T.DefineFunction (fname, x, e) :: efs, e + let ffs, f = expression env f in + (T.DefineFunction (fname, x, e) :: efs) @ ffs, f | S.AllocateBlock a -> let afs, a = expression env a in afs, allocate_block a