diff options
| -rw-r--r-- | toplevel/metasyntax.ml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml index 12a5903e6e..265f4945d1 100644 --- a/toplevel/metasyntax.ml +++ b/toplevel/metasyntax.ml @@ -46,8 +46,14 @@ let globalize_ref vars ref = | RVar (loc,x) -> Ident (loc,x) | _ -> anomaly "globalize_ref: not a reference" +let globalize_ref_term vars ref = + match Constrintern.interp_reference vars ref with + | RRef (loc,a) -> CRef (Constrextern.extern_reference loc a) + | RVar (loc,x) -> CRef (Ident (loc,x)) + | c -> Constrextern.extern_rawconstr c + let rec globalize_constr_expr vars = function - | CRef ref -> CRef (globalize_ref vars ref) + | CRef ref -> globalize_ref_term vars ref | CAppExpl (_,ref,l) -> let f = map_constr_expr_with_binders globalize_constr_expr |
