@@ -206,6 +206,13 @@ let tc1_get_stmt side tc =
206206 | _ ->
207207 tc_error_noXhl ~kinds: (hlkinds_Xhl_r `Stmt ) !! tc
208208
209+ (* ------------------------------------------------------------------ *)
210+ let tc1_process_codepos_or_range tc (side , cpr ) =
211+ let me, _ = tc1_get_stmt side tc in
212+ let env = FApi. tc1_env tc in
213+ let env = EcEnv.Memory. push_active_ss me env in
214+ EcTyping. trans_codepos_or_range env cpr
215+
209216(* ------------------------------------------------------------------ *)
210217let tc1_process_codepos_range tc (side , cpr ) =
211218 let me, _ = tc1_get_stmt side tc in
@@ -334,19 +341,19 @@ let push_memenvs_pre (hyps : LDecl.hyps) (f : form) =
334341exception InvalidSplit of codepos1
335342
336343let s_split env i s =
337- let module Zpr = EcMatching. Zipper in
338- try Zpr . split_at_cpos1 env i s
339- with Zpr .InvalidCPos -> raise (InvalidSplit i)
344+ let module Pos = EcMatching. Position in
345+ try Pos . split_at_cpos1 env i s
346+ with Pos .InvalidCPos -> raise (InvalidSplit i)
340347
341348let s_split_i env i s =
342- let module Zpr = EcMatching. Zipper in
343- try Zpr . find_by_cpos1 ~rev: false env i s
344- with Zpr .InvalidCPos -> raise (InvalidSplit i)
349+ let module Pos = EcMatching. Position in
350+ try Pos . find_by_cpos1 ~rev: false env i s
351+ with Pos .InvalidCPos -> raise (InvalidSplit i)
345352
346353let o_split ?rev env i s =
347- let module Zpr = EcMatching. Zipper in
348- try Zpr . may_split_at_cpos1 ?rev env i s
349- with Zpr .InvalidCPos -> raise (InvalidSplit (oget i))
354+ let module Pos = EcMatching. Position in
355+ try Pos . may_split_at_cpos1 ?rev env i s
356+ with Pos .InvalidCPos -> raise (InvalidSplit (oget i))
350357
351358(* -------------------------------------------------------------------- *)
352359let t_hS_or_bhS_or_eS ?th ?teh ?tbh ?te tc =
@@ -692,14 +699,14 @@ let t_fold f (cenv : code_txenv) (cpos : codepos) (_ : form * form) (state, s) =
692699 let env = EcEnv.LDecl. toenv (snd cenv) in
693700 let (me, f) = Zpr. fold env cenv cpos (fun _ -> f) state s in
694701 ((me, f, [] ) : memenv * _ * form list )
695- with Zpr. InvalidCPos -> tc_error (fst cenv) " invalid code position"
702+ with InvalidCPos -> tc_error (fst cenv) " invalid code position"
696703
697704let t_zip f (cenv : code_txenv ) (cpos : codepos ) (prpo : form * form ) (state , s ) =
698705 try
699706 let env = EcEnv.LDecl. toenv (snd cenv) in
700707 let (me, zpr, gs) = f cenv prpo state (Zpr. zipper_of_cpos env cpos s) in
701708 ((me, Zpr. zip zpr, gs) : memenv * _ * form list )
702- with Zpr. InvalidCPos -> tc_error (fst cenv) " invalid code position"
709+ with InvalidCPos -> tc_error (fst cenv) " invalid code position"
703710
704711let t_code_transform (side : oside ) ?(bdhoare = false ) cpos tr tx tc =
705712 let pf = FApi. tc1_penv tc in
0 commit comments