diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/term.ml | 4 | ||||
| -rw-r--r-- | kernel/term.mli | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/kernel/term.ml b/kernel/term.ml index c08bb1d86e..72ab35f128 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -396,6 +396,10 @@ let destAppL = function | (DOPN (AppL,a)) -> a | _ -> invalid_arg "destAppL" +let destApplication = function + | (DOPN (AppL,a)) when Array.length a <> 0 -> (a.(0), array_tl a) + | _ -> invalid_arg "destApplication" + let isAppL = function DOPN(AppL,_) -> true | _ -> false let args_app = function diff --git a/kernel/term.mli b/kernel/term.mli index a43012a0f5..8e1c402599 100644 --- a/kernel/term.mli +++ b/kernel/term.mli @@ -280,6 +280,7 @@ val destAppL : constr -> constr array val isAppL : constr -> bool val hd_app : constr -> constr val args_app : constr -> constr array +val destApplication : constr -> constr * constr array (* Destructs a constant *) val destConst : constr -> section_path * constr array |
