From bef57f9d4921e5e8021c086923628b16f5ea18ea Mon Sep 17 00:00:00 2001 From: Son Ho Date: Thu, 3 Feb 2022 20:13:06 +0100 Subject: Cleanup a bit --- src/PureMicroPasses.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/PureMicroPasses.ml') diff --git a/src/PureMicroPasses.ml b/src/PureMicroPasses.ml index 7e74835a..66442ec7 100644 --- a/src/PureMicroPasses.ml +++ b/src/PureMicroPasses.ml @@ -1,6 +1,5 @@ (** The following module defines micro-passes which operate on the pure AST *) -open Errors open Pure open PureUtils open TranslateCore @@ -605,7 +604,9 @@ let filter_unused (filter_monadic_calls : bool) (ctx : trans_ctx) (* Return *) { def with body; inputs_lvs } -(** Add unit arguments for functions with no arguments, and change their return type. *) +(** Add unit arguments for functions with no arguments, and change their return type. + TODO: filter the backward functions with no outputs. + *) let to_monadic (def : fun_def) : fun_def = (* Update the body *) let obj = @@ -677,7 +678,7 @@ let unit_vars_to_unit (def : fun_def) : fun_def = { def with body; inputs_lvs } (** Unfold the monadic let-bindings to explicit matches. *) -let unfold_monadic_let_bindings (ctx : trans_ctx) (def : fun_def) : fun_def = +let unfold_monadic_let_bindings (_ctx : trans_ctx) (def : fun_def) : fun_def = (* It is a very simple map *) let obj = object (self) -- cgit v1.2.3