From 2342bbf99c7edf849828b9c47325de4ac331f129 Mon Sep 17 00:00:00 2001 From: David MICHEL Date: Tue, 29 Oct 2024 10:26:53 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"Application=20iliad=20par=20d=C3=A9fa?= =?UTF-8?q?ut"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c95eb43db0351ef9cc09faf8850a89c26b0d3bb7. --- makefiles/variables.mk | 1 + src/mlang/m_frontend/expand_macros.ml | 2 +- src/mlang/utils/cli.ml | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/makefiles/variables.mk b/makefiles/variables.mk index 9e5ceef2a..0d842e001 100644 --- a/makefiles/variables.mk +++ b/makefiles/variables.mk @@ -54,6 +54,7 @@ MLANG_BIN=dune exec $(ROOT_DIR)/_build/default/src/main.exe -- PRECISION?=double MLANG_DEFAULT_OPTS=\ + -A iliad\ --display_time --debug\ --precision $(PRECISION) diff --git a/src/mlang/m_frontend/expand_macros.ml b/src/mlang/m_frontend/expand_macros.ml index 589ae6aec..5b00c523e 100644 --- a/src/mlang/m_frontend/expand_macros.ml +++ b/src/mlang/m_frontend/expand_macros.ml @@ -147,6 +147,7 @@ let get_selected_chains (apps_env : apps_env) in StrMap.fold sel_chain chains StrMap.empty +(** Eliminates constants and loops *) let check_apps_on_cmdline (apps_env : apps_env) : unit = let iter a _ = match StrMap.find_opt a apps_env.apps with @@ -255,7 +256,6 @@ let elim_unselected_apps (p : Mast.program) : Mast.program = List.rev prog module ConstMap = StrMap -(** Eliminates constants and loops *) type const_context = float Pos.marked ConstMap.t diff --git a/src/mlang/utils/cli.ml b/src/mlang/utils/cli.ml index 9666f5420..2071c9258 100644 --- a/src/mlang/utils/cli.ml +++ b/src/mlang/utils/cli.ml @@ -30,7 +30,8 @@ let files = & info [] ~docv:"FILES" ~doc:"M files to be compiled") let applications = - Arg.(value & opt (list string) [] & info [ "A" ] ~doc:"Application name(s)") + Arg.( + non_empty & opt (list string) [] & info [ "A" ] ~doc:"Application name(s)") let without_dgfip_m = Arg.( @@ -287,7 +288,7 @@ let set_all_arg_refs (files_ : string list) applications_ (income_year_ : int option) (value_sort_ : value_sort) (round_ops_ : round_ops) = source_files := files_; - (application_names := match applications_ with [] -> [ "iliad" ] | al -> al); + application_names := applications_; without_dgfip_m := without_dgfip_m_; debug_flag := debug_; var_info_debug := var_info_debug_;