aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/unification.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-11-20 03:04:13 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-02-14 17:30:31 +0100
commitd833b81b49366e95cf20a1d00f9c63883adb8942 (patch)
tree1afca49fcd42e96b658c90d28e9da692ccc39724 /pretyping/unification.ml
parentc0d38ae52ac410811e7df54c52e8d3a18bb11bcb (diff)
Rewrite API using EConstr.
Diffstat (limited to 'pretyping/unification.ml')
-rw-r--r--pretyping/unification.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index bc59a4108..81d9ecad5 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -1272,13 +1272,15 @@ let w_coerce env evd mv c =
let unify_to_type env sigma flags c status u =
let sigma, c = refresh_universes (Some false) env sigma c in
- let t = get_type_of env sigma (EConstr.of_constr (nf_meta sigma c)) in
- let t = nf_betaiota sigma (EConstr.of_constr (nf_meta sigma t)) in
- unify_0 env sigma CUMUL flags (EConstr.of_constr t) (EConstr.of_constr u)
+ let c = EConstr.of_constr c in
+ let t = get_type_of env sigma (nf_meta sigma c) in
+ let t = EConstr.of_constr t in
+ let t = nf_betaiota sigma (nf_meta sigma t) in
+ let t = EConstr.of_constr t in
+ unify_0 env sigma CUMUL flags t u
let unify_type env sigma flags mv status c =
let mvty = Typing.meta_type sigma mv in
- let mvty = EConstr.Unsafe.to_constr mvty in
let mvty = nf_meta sigma mvty in
unify_to_type env sigma
(set_flags_for_type flags)