diff options
| author | Pierre-Marie Pédrot | 2016-11-06 03:23:13 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2017-02-14 17:25:28 +0100 |
| commit | b365304d32db443194b7eaadda63c784814f53f1 (patch) | |
| tree | 95c09bc42f35a5d49af5aeb16a281105e674a824 /engine/termops.ml | |
| parent | b113f9e1ca88514cd9d94dfe90669a27689b7434 (diff) | |
Evarconv API using EConstr.
Diffstat (limited to 'engine/termops.ml')
| -rw-r--r-- | engine/termops.ml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engine/termops.ml b/engine/termops.ml index 356312e2f6..26b22be4e4 100644 --- a/engine/termops.ml +++ b/engine/termops.ml @@ -1068,6 +1068,17 @@ let dependency_closure env sigma sign hyps = sign in List.rev lh +let global_app_of_constr sigma c = + let open Univ in + let open Globnames in + match EConstr.kind sigma c with + | Const (c, u) -> (ConstRef c, u), None + | Ind (i, u) -> (IndRef i, u), None + | Construct (c, u) -> (ConstructRef c, u), None + | Var id -> (VarRef id, Instance.empty), None + | Proj (p, c) -> (ConstRef (Projection.constant p), Instance.empty), Some c + | _ -> raise Not_found + (* Combinators on judgments *) let on_judgment f j = { uj_val = f j.uj_val; uj_type = f j.uj_type } |
