From 2bbf1305a080667d8547c44b2684010aba3d8d45 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Tue, 30 Sep 2014 01:18:24 +0200 Subject: Simplify evarconv thanks to new delta status of projections, using whd_state_gen to handle unfolding. Add an isProj/destProj in term. Use the proper environment everywhere in unification.ml. --- kernel/term.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kernel/term.ml') diff --git a/kernel/term.ml b/kernel/term.ml index ab678666f..734b7853f 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -310,6 +310,12 @@ let destCase c = match kind_of_term c with let isCase c = match kind_of_term c with Case _ -> true | _ -> false +let isProj c = match kind_of_term c with Proj _ -> true | _ -> false + +let destProj c = match kind_of_term c with + | Proj (p, c) -> (p, c) + | _ -> raise DestKO + let destFix c = match kind_of_term c with | Fix fix -> fix | _ -> raise DestKO -- cgit v1.2.3