Decode a Lean environment in parallel with hybrid caching.
(list: LeanList<LeanBorrowed<'_>>)
| 1072 | cnst: constant_val, |
| 1073 | induct, |
| 1074 | cidx, |
| 1075 | num_params, |
| 1076 | num_fields, |
| 1077 | is_unsafe, |
| 1078 | }) |
| 1079 | }, |
| 1080 | 7 => { |
| 1081 | let inner = LeanIxRecursorVal::from_ctor(inner_obj.as_ctor()); |
| 1082 | let constant_val = decode_constant_val(inner.get_obj(0), cache); |
| 1083 | let all: Vec<_> = collect_list_borrowed(inner.get_obj(1).as_list()) |
| 1084 | .into_iter() |
| 1085 | .map(|o| decode_name(o, cache.global)) |
| 1086 | .collect(); |
| 1087 | let num_params = LeanNat::to_nat(&inner.get_obj(2)); |
| 1088 | let num_indices = LeanNat::to_nat(&inner.get_obj(3)); |
| 1089 | let num_motives = LeanNat::to_nat(&inner.get_obj(4)); |
| 1090 | let num_minors = LeanNat::to_nat(&inner.get_obj(5)); |
| 1091 | let rules: Vec<_> = collect_list_borrowed(inner.get_obj(6).as_list()) |
| 1092 | .into_iter() |
| 1093 | .map(|o| decode_recursor_rule(o, cache)) |
| 1094 | .collect(); |
| 1095 | let k = inner.get_num_8(0) != 0; |
| 1096 | let is_unsafe = inner.get_num_8(1) != 0; |
| 1097 | ConstantInfo::RecInfo(RecursorVal { |
| 1098 | cnst: constant_val, |
| 1099 | all, |
| 1100 | num_params, |
| 1101 | num_indices, |
| 1102 | num_motives, |
| 1103 | num_minors, |
| 1104 | rules, |
| 1105 | k, |
| 1106 | is_unsafe, |
| 1107 | }) |
| 1108 | }, |
| 1109 | tag => unreachable!("Invalid Lean.ConstantInfo tag: {tag}"), |
| 1110 | } |
| 1111 | } |
| 1112 |
no test coverage detected