diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/term.ml | 5 | ||||
| -rw-r--r-- | kernel/term.mli | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/kernel/term.ml b/kernel/term.ml index fa204b5701..44a10aa355 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -339,6 +339,11 @@ let decompose_app c = | App (f,cl) -> (f, Array.to_list cl) | _ -> (c,[]) +let decompose_appvect c = + match kind_of_term c with + | App (f,cl) -> (f, cl) + | _ -> (c,[||]) + (****************************************************************************) (* Functions for dealing with constr terms *) (****************************************************************************) diff --git a/kernel/term.mli b/kernel/term.mli index a3745d5e31..8131753fee 100644 --- a/kernel/term.mli +++ b/kernel/term.mli @@ -152,6 +152,9 @@ val destApplication : constr -> constr * constr array (** Decompose any term as an applicative term; the list of args can be empty *) val decompose_app : constr -> constr * constr list +(** Same as [decompose_app], but returns an array. *) +val decompose_appvect : constr -> constr * constr array + (** Destructs a constant *) val destConst : constr -> constant |
