diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-11-19 01:07:35 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-02-14 17:28:56 +0100 |
commit | db252cb87e9c63f400fd4fddd2d771df3160d592 (patch) | |
tree | 25c1cb44c479ffa10e6db87f91b43f7e60b427bd /pretyping/recordops.ml | |
parent | 118ae18590dbc7d01cf34e0cd6133b1e34ef9090 (diff) |
Inv API using EConstr.
Diffstat (limited to 'pretyping/recordops.ml')
-rw-r--r-- | pretyping/recordops.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/recordops.ml b/pretyping/recordops.ml index f09f3221d..3230f92da 100644 --- a/pretyping/recordops.ml +++ b/pretyping/recordops.ml @@ -203,7 +203,8 @@ let compute_canonical_projections warn (con,ind) = let ctx = Univ.ContextSet.of_context ctx in let c = Environ.constant_value_in env (con,u) in let lt,t = Reductionops.splay_lam env Evd.empty (EConstr.of_constr c) in - let lt = List.rev_map snd lt in + let t = EConstr.Unsafe.to_constr t in + let lt = List.rev_map (snd %> EConstr.Unsafe.to_constr) lt in let args = snd (decompose_app t) in let { s_EXPECTEDPARAM = p; s_PROJ = lpj; s_PROJKIND = kl } = lookup_structure ind in @@ -303,6 +304,7 @@ let check_and_decompose_canonical_structure ref = | Some vc -> vc | None -> error_not_structure ref in let body = snd (splay_lam (Global.env()) Evd.empty (EConstr.of_constr vc)) (** FIXME *) in + let body = EConstr.Unsafe.to_constr body in let f,args = match kind_of_term body with | App (f,args) -> f,args | _ -> error_not_structure ref in |