summaryrefslogtreecommitdiff
path: root/compiler/Translate.ml
diff options
context:
space:
mode:
authorSon Ho2023-12-14 17:48:44 +0100
committerSon Ho2023-12-14 17:48:44 +0100
commitf1f41818fb14a6c46442ca42a49a3aab0a5b1aaf (patch)
treee2fb7a4a227ed5699b0535ffe5289344f738ab81 /compiler/Translate.ml
parentf074320eee2203857e669cfb72f7f8f94ab52151 (diff)
Make progress on generated merged fwd/back functions
Diffstat (limited to '')
-rw-r--r--compiler/Translate.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/Translate.ml b/compiler/Translate.ml
index 54e24066..06d4bd6d 100644
--- a/compiler/Translate.ml
+++ b/compiler/Translate.ml
@@ -223,7 +223,9 @@ let translate_function_to_pure (trans_ctx : trans_ctx)
sg.info.fwd_info.num_inputs_with_fuel_with_state
in
let num_back_inputs =
- (Option.get sg.info.back_info).num_inputs_no_fuel_no_state
+ match sg.info.back_info with
+ | SingleBack (Some info) -> info.num_inputs_no_fuel_no_state
+ | _ -> raise (Failure "Unexpected")
in
Collections.List.subslice sg.inputs num_forward_inputs
(num_forward_inputs + num_back_inputs)