From 48b324c1651b21f0890d30534d76cd8abdf9790a Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Mon, 4 Apr 2022 18:12:19 +0200 Subject: [PATCH] More comments --- compiler/scalc/compile_from_lambda.ml | 4 +++- compiler/scalc/to_python.ml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/scalc/compile_from_lambda.ml b/compiler/scalc/compile_from_lambda.ml index 13246b63..4ffc5c68 100644 --- a/compiler/scalc/compile_from_lambda.ml +++ b/compiler/scalc/compile_from_lambda.ml @@ -97,7 +97,9 @@ let rec translate_expr (ctxt : ctxt) (expr : L.expr Pos.marked) : | _ -> let tmp_var = A.LocalName.fresh - ( (*This piece of logic is used to make the code more readable *) + ( (*This piece of logic is used to make the code more readable. TODO: + should be removed when + https://github.com/CatalaLang/catala/issues/240 is fixed. *) (match ctxt.inside_definition_of with | None -> ctxt.context_name | Some v -> diff --git a/compiler/scalc/to_python.ml b/compiler/scalc/to_python.ml index 53264c68..bf735982 100644 --- a/compiler/scalc/to_python.ml +++ b/compiler/scalc/to_python.ml @@ -197,7 +197,8 @@ module IntMap = Map.Make (Int) (** For each `LocalName.t` defined by its string and then by its hash, we keep track of which local integer id we've given it. This is used to keep variable naming with low indices rather than one global counter for all - variables. *) + variables. TODO: should be removed when + https://github.com/CatalaLang/catala/issues/240 is fixed. *) let string_counter_map : int IntMap.t StringMap.t ref = ref StringMap.empty let format_var (fmt : Format.formatter) (v : LocalName.t) : unit =