@@ -406,25 +406,25 @@ let define_by_eqs opts eqs nt =
406
406
| Struct -> StructuralOn i
407
407
| Nested -> NestedOn (Some i)
408
408
in
409
- let rec_annot =
409
+ let is_rec, rec_annot =
410
410
let default_recarg () =
411
411
let idx = List. length sign - 1 in
412
412
(idx, None )
413
413
in
414
414
match rec_annot with
415
415
| None ->
416
416
(match is_rec with
417
- | Some false -> Some (StructuralOn (default_recarg () ))
418
- | _ -> None )
417
+ | Some false -> is_rec, Some (StructuralOn (default_recarg () ))
418
+ | _ -> is_rec, None )
419
419
| Some (reck , None) ->
420
420
(match is_recursive i [ieqs] with (* Recursive in its own body? *)
421
- | Some _ -> Some (interp_reca reck (default_recarg () ))
422
- | None -> if reck == Nested then Some (NestedOn None )
423
- else Some (StructuralOn (default_recarg () )))
421
+ | Some _ -> Some false , Some (interp_reca reck (default_recarg () ))
422
+ | None -> if reck == Nested then is_rec, Some (NestedOn None )
423
+ else Some false , Some (StructuralOn (default_recarg () )))
424
424
| Some (reck , Some lid ) ->
425
425
try
426
426
let k, _, _ = lookup_rel_id (snd lid) sign in
427
- Some (interp_reca reck (List. length sign - k, Some lid))
427
+ Some false , Some (interp_reca reck (List. length sign - k, Some lid))
428
428
with Not_found ->
429
429
user_err_loc (Some (fst lid), " struct_index" ,
430
430
Pp. (str" No argument named " ++ Id. print (snd lid) ++ str" found" ))
0 commit comments