From edb1219070a00ecc050b165a589bb6cd88c39133 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 15 Dec 2023 13:13:03 +0100 Subject: [PATCH] fmt --- flap/src/fopix/hobixToFopix.ml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flap/src/fopix/hobixToFopix.ml b/flap/src/fopix/hobixToFopix.ml index 518ad41..765647f 100644 --- a/flap/src/fopix/hobixToFopix.ml +++ b/flap/src/fopix/hobixToFopix.ml @@ -121,20 +121,20 @@ let free_variables = | s :: xs -> M.union (f s) (unions f xs) in (*Une variable libre est une variable qui peut ĂȘtre substituĂ©*) - + (*TODO : rajouter des explications pour While Define et Fun*) let rec fvs = function | S.Literal _ -> M.empty | S.Variable x -> M.singleton x - | S.While (cond, e) -> unions fvs [cond;e] + | S.While (cond, e) -> unions fvs [ cond; e ] | S.Define (vd, a) -> let liste_def_valeur = - match vd with - | S.SimpleValue (id,expr) -> [(id,expr)] - | S.RecFunctions (list) -> list - in - let id, expr = List.split liste_def_valeur in - M.diff (unions fvs (a::expr)) (M.of_list id) + match vd with + | S.SimpleValue (id, expr) -> [ id, expr ] + | S.RecFunctions list -> list + in + let id, expr = List.split liste_def_valeur in + M.diff (unions fvs (a :: expr)) (M.of_list id) | S.ReadBlock (a, b) -> unions fvs [ a; b ] | S.Apply (a, b) -> unions fvs (a :: b) | S.WriteBlock (a, b, c) | S.IfThenElse (a, b, c) -> unions fvs [ a; b; c ] @@ -149,7 +149,7 @@ let free_variables = unions fvs ((a :: ExtStd.Array.present_to_list b) @ c) in fun e -> M.elements (fvs e) - +;; (** A closure compilation environment relates an identifier to the way it is accessed in the compiled version of the function's