From d6dd162bf9f55dea839ce1fdceb7c9ca56ebcf7b Mon Sep 17 00:00:00 2001 From: herbelin Date: Tue, 7 Mar 2000 17:04:04 +0000 Subject: Ajout destApplication git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@295 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/term.ml | 4 ++++ kernel/term.mli | 1 + 2 files changed, 5 insertions(+) (limited to 'kernel') 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 -- cgit v1.2.3