diff options
author | Son Ho | 2023-12-22 21:03:17 +0100 |
---|---|---|
committer | Son Ho | 2023-12-22 21:03:17 +0100 |
commit | 70d506d148e5ae1a3e4115034161f449aff666ed (patch) | |
tree | 43faecd146f5d792d398512097b3afdb503ae11c /compiler/PrintPure.ml | |
parent | b230ddacd44a1ca1804940bf89253bde8de7ffe1 (diff) |
Fix the output type of the loops backward functions
Diffstat (limited to '')
-rw-r--r-- | compiler/PrintPure.ml | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/PrintPure.ml b/compiler/PrintPure.ml index 315dd512..66475d02 100644 --- a/compiler/PrintPure.ml +++ b/compiler/PrintPure.ml @@ -711,21 +711,14 @@ and loop_to_string (env : fmt_env) (indent : string) (indent_incr : string) ^ String.concat "; " (List.map (var_to_string env) loop.inputs) ^ "]" in - let back_output_tys = - let tys = - match loop.back_output_tys with - | None -> "" - | Some tys -> String.concat "; " (List.map (ty_to_string env false) tys) - in - "back_output_tys: [" ^ tys ^ "]" - in + let output_ty = "output_ty: " ^ ty_to_string env false loop.output_ty in let fun_end = texpression_to_string env false indent2 indent_incr loop.fun_end in let loop_body = texpression_to_string env false indent2 indent_incr loop.loop_body in - "loop {\n" ^ indent1 ^ loop_inputs ^ "\n" ^ indent1 ^ back_output_tys ^ "\n" + "loop {\n" ^ indent1 ^ loop_inputs ^ "\n" ^ indent1 ^ output_ty ^ "\n" ^ indent1 ^ "fun_end: {\n" ^ indent2 ^ fun_end ^ "\n" ^ indent1 ^ "}\n" ^ indent1 ^ "loop_body: {\n" ^ indent2 ^ loop_body ^ "\n" ^ indent1 ^ "}\n" ^ indent ^ "}" |