diff options
author | Son Ho | 2022-02-03 20:13:06 +0100 |
---|---|---|
committer | Son Ho | 2022-02-03 20:13:06 +0100 |
commit | bef57f9d4921e5e8021c086923628b16f5ea18ea (patch) | |
tree | b8ac532543979e31a52319a592068924931604b4 /src/PureMicroPasses.ml | |
parent | 53b2695d426b1b04d5527a42b9d79a186a24e65b (diff) |
Cleanup a bit
Diffstat (limited to '')
-rw-r--r-- | src/PureMicroPasses.ml | 7 |
1 files changed, 4 insertions, 3 deletions
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) |