diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2000-03-07 17:04:04 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2000-03-07 17:04:04 +0000 |
commit | d6dd162bf9f55dea839ce1fdceb7c9ca56ebcf7b (patch) | |
tree | 897f5a349de14d7fe8ecff3d69c7759bf7e242f4 /kernel | |
parent | 7ac3d69bcfc973219d2a87622e1cbf45883bb4ca (diff) |
Ajout destApplication
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@295 85f007b7-540e-0410-9357-904b9bb8a0f7
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 c08bb1d86..72ab35f12 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 a43012a0f..8e1c40259 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 |