aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2021-03-12 13:17:59 +0100
committerPierre-Marie Pédrot2021-03-16 20:02:56 +0100
commit22be1892ee1b6030cfe9406bf72bb320dbe68be7 (patch)
treec0ff49ac14f24c338bf0953c53959d41b950fb0c /test-suite
parent761d3ccaf6a593a73811da38fa731c2f601902f8 (diff)
Slightly richer API allowing to shift the inductive in a block.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/ltac2/ind.v5
1 files changed, 3 insertions, 2 deletions
diff --git a/test-suite/ltac2/ind.v b/test-suite/ltac2/ind.v
index c06ffebabe..6f7352d224 100644
--- a/test-suite/ltac2/ind.v
+++ b/test-suite/ltac2/ind.v
@@ -9,11 +9,12 @@ Ltac2 Eval
end in
let data := Ind.data nat in
(* Check that there is only one inductive in the block *)
- let ntypes := Ind.ntypes data in
+ let ntypes := Ind.nblocks data in
let () := if Int.equal ntypes 1 then () else Control.throw Not_found in
- let nat' := Ind.get_type data 0 in
+ let nat' := Ind.repr (Ind.get_block data 0) in
(* Check it corresponds *)
let () := if Ind.equal nat nat' then () else Control.throw Not_found in
+ let () := if Int.equal (Ind.index nat) 0 then () else Control.throw Not_found in
(* Check the number of constructors *)
let nconstr := Ind.nconstructors data in
let () := if Int.equal nconstr 2 then () else Control.throw Not_found in