Skip to content

Commit c763d93

Browse files
Merge PR #20088: Add Ltac2.Constr.{is_string,is_sort}
Reviewed-by: ppedrot Co-authored-by: ppedrot <[email protected]>
2 parents 7481413 + 4e8bbe7 commit c763d93

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- **Added:**
2+
``Ltac2.Constr.is_string``, ``Ltac2.Constr.is_sort``
3+
(`#20088 <https://github.com/coq/coq/pull/20088>`_,
4+
by Jason Gross).

user-contrib/Ltac2/Constr.v

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,20 @@ Ltac2 is_uint63(c: constr) :=
479479
| _ => false
480480
end.
481481

482+
Ltac2 is_string(c: constr) :=
483+
match Unsafe.kind c with
484+
| Unsafe.String _ => true
485+
| _ => false
486+
end.
487+
482488
Ltac2 is_array(c: constr) :=
483489
match Unsafe.kind c with
484490
| Unsafe.Array _ _ _ _ => true
485491
| _ => false
486492
end.
493+
494+
Ltac2 is_sort(c: constr) :=
495+
match Unsafe.kind c with
496+
| Unsafe.Sort _ => true
497+
| _ => false
498+
end.

0 commit comments

Comments
 (0)