From 532b43ad73a4964cd75d8548d43eb894b7f225c1 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 23 Feb 2022 23:36:53 +0100 Subject: Start working on generating code which uses a state-error monad --- src/main.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main.ml') diff --git a/src/main.ml b/src/main.ml index df2d1b0c..86f15959 100644 --- a/src/main.ml +++ b/src/main.ml @@ -177,15 +177,20 @@ let () = filter_useless_monadic_calls = !filter_useless_calls; filter_useless_functions = !filter_useless_functions; add_unit_args = false; + use_state_monad = not !no_state; } in + (* Small issue: the monadic `bind` only works for the error-monad, not + * the state-error monad (there are definitions to write and piping to do) *) + assert ( + (not micro_passes_config.use_state_monad) + || micro_passes_config.unfold_monadic_let_bindings); let trans_config = { Translate.eval_config; mp_config = micro_passes_config; split_files = not !no_split_files; test_unit_functions; - use_state_monad = not !no_state; extract_decreases_clauses = not !no_decreases_clauses; extract_template_decreases_clauses = !template_decreases_clauses; } -- cgit v1.2.3