Skip to content

Commit

Permalink
Merge PR #17894: Add Ltac2.Constr.{is_float,is_uint63,is_array}
Browse files Browse the repository at this point in the history
Reviewed-by: ppedrot
Reviewed-by: SkySkimmer
Co-authored-by: SkySkimmer <SkySkimmer@users.noreply.github.com>
  • Loading branch information
coqbot-app[bot] and SkySkimmer committed Aug 1, 2023
2 parents 7a3e469 + c5c5cf0 commit 74e210c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/changelog/06-Ltac2-language/17894-is_float.rst
@@ -0,0 +1,4 @@
- **Added:**
``Ltac2.Constr.is_float``, ``Ltac2.Constr.is_uint63``, ``Ltac2.Constr.is_array``
(`#17894 <https://github.com/coq/coq/pull/17894>`_,
by Jason Gross).
18 changes: 18 additions & 0 deletions user-contrib/Ltac2/Constr.v
Expand Up @@ -190,3 +190,21 @@ Ltac2 is_const(c: constr) :=
| Unsafe.Constant _ _ => true
| _ => false
end.

Ltac2 is_float(c: constr) :=
match Unsafe.kind c with
| Unsafe.Float _ => true
| _ => false
end.

Ltac2 is_uint63(c: constr) :=
match Unsafe.kind c with
| Unsafe.Uint63 _ => true
| _ => false
end.

Ltac2 is_array(c: constr) :=
match Unsafe.kind c with
| Unsafe.Array _ _ _ _ => true
| _ => false
end.

0 comments on commit 74e210c

Please sign in to comment.