diff options
Diffstat (limited to 'translate')
-rw-r--r-- | translate/ppconstrnew.ml | 8 | ||||
-rw-r--r-- | translate/ppvernacnew.ml | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/translate/ppconstrnew.ml b/translate/ppconstrnew.ml index 6bac9b1f1..47a92f7ca 100644 --- a/translate/ppconstrnew.ml +++ b/translate/ppconstrnew.ml @@ -96,6 +96,7 @@ let surround p = hov 1 (str"(" ++ p ++ str")") let pr_located pr ((b,e),x) = if Options.do_translate() && (b,e)<>dummy_loc then + let (b,e) = unloc (b,e) in comment b ++ pr x ++ comment e else pr x @@ -146,7 +147,8 @@ let pr_name = function let pr_lident (b,_ as loc,id) = if loc <> dummy_loc then - pr_located pr_id ((b,b+String.length(string_of_id id)),id) + let (b,_) = unloc loc in + pr_located pr_id (make_loc (b,b+String.length(string_of_id id)),id) else pr_id id let pr_lname = function @@ -189,8 +191,8 @@ let pr_eqn pr (loc,pl,rhs) = pr_sep_com spc (pr ltop) rhs)) let begin_of_binder = function - LocalRawDef(((b,_),_),_) -> b - | LocalRawAssum(((b,_),_)::_,_) -> b + LocalRawDef((loc,_),_) -> fst (unloc loc) + | LocalRawAssum((loc,_)::_,_) -> fst (unloc loc) | _ -> assert false let begin_of_binders = function diff --git a/translate/ppvernacnew.ml b/translate/ppvernacnew.ml index e0354caf2..b7e739a5c 100644 --- a/translate/ppvernacnew.ml +++ b/translate/ppvernacnew.ml @@ -32,7 +32,8 @@ let pr_spc_type = pr_sep_com spc pr_type let pr_lident (b,_ as loc,id) = if loc <> dummy_loc then - pr_located pr_id ((b,b+String.length(string_of_id id)),id) + let (b,_) = unloc loc in + pr_located pr_id (make_loc (b,b+String.length(string_of_id id)),id) else pr_id id let pr_lname = function @@ -313,7 +314,7 @@ let pr_onescheme (id,dep,ind,s) = let begin_of_inductive = function [] -> 0 - | (_,(((b,_),_),_))::_ -> b + | (_,((loc,_),_))::_ -> fst (unloc loc) let pr_class_rawexpr = function | FunClass -> str"Funclass" |