diff --git a/ppx/distrib/ppx_distrib_expander.ml b/ppx/distrib/ppx_distrib_expander.ml index 098b90224..ceee41dd3 100644 --- a/ppx/distrib/ppx_distrib_expander.ml +++ b/ppx/distrib/ppx_distrib_expander.ml @@ -11,7 +11,7 @@ open Stdppx open Ppxlib.Ast_builder.Default open Ppxlib.Ast_helper open Printf -module Format = Caml.Format +module Format = Stdlib.Format open Myhelpers let use_logging = false @@ -28,12 +28,12 @@ let notify fmt = Printf.ksprintf (fun s -> let _cmd = Printf.sprintf "notify-send %S" s in - let (_ : int) = Caml.Sys.command _cmd in + let (_ : int) = Stdlib.Sys.command _cmd in ()) fmt ;; -let ( @@ ) = Caml.( @@ ) +let ( @@ ) = Stdlib.( @@ ) let nolabel = Asttypes.Nolabel let mangle_construct_name name = @@ -617,7 +617,8 @@ let make_reifier_gen ~kind is_rec tdecl : Reifier_info.t = | Reify -> [%expr OCanren.Reifier.zed (OCanren.Reifier.rework ~fv:[%e fmapt])] | Prj_exn -> fmapt])] - | _ -> failwiths ~loc:manifest.ptyp_loc "Not supported %s %d" Caml.__FILE__ Caml.__LINE__ + | _ -> + failwiths ~loc:manifest.ptyp_loc "Not supported %s %d" Stdlib.__FILE__ Stdlib.__LINE__ in { Reifier_info.typ = None; body = body (); name = pat_name; decl = tdecl } | None -> assert false @@ -867,8 +868,8 @@ let process_main ~loc rec_ (base_tdecl, tdecl) = failwiths ~loc:base_tdecl.ptype_loc "%s %d Open and abstract types are not supported" - Caml.__FILE__ - Caml.__LINE__) + Stdlib.__FILE__ + Stdlib.__LINE__) in (* let typ_of_decl decl = ptyp_constr diff --git a/ppx/fresh/ppx_fresh.ml b/ppx/fresh/ppx_fresh.ml index 0cb00e23a..ae72fb978 100644 --- a/ppx/fresh/ppx_fresh.ml +++ b/ppx/fresh/ppx_fresh.ml @@ -210,14 +210,14 @@ let mapper = in ans | None -> - Caml.Format.eprintf "Can't reconstruct args of 'fresh'"; + Stdlib.Format.eprintf "Can't reconstruct args of 'fresh'"; { e with pexp_desc = Pexp_apply (e1, [ Nolabel, new_body ]) }) | Pexp_apply (d, [ (_, body) ]) when is_defer d -> let ans = [%expr delay (fun () -> [%e self#expression body])] in ans | Pexp_apply (d, body) when is_unif d -> (* let loc_str = - Caml.Format.asprintf "%a" Selected_ast.Ast.Location.print_compact e.pexp_loc; + Stdlib.Format.asprintf "%a" Selected_ast.Ast.Location.print_compact e.pexp_loc; in let body = (Labelled "loc", Exp.constant (Pconst_string (loc_str,None))) :: body in *) Exp.apply ~loc:e.pexp_loc d body @@ -309,7 +309,7 @@ let mapper = | Pexp_open (_od, ee) -> { e with pexp_desc = Pexp_open (_od, self#expression ee) } | Pexp_letop _ | Pexp_extension _ | Pexp_pack _ -> e (* | _ -> - Caml.Format.printf "%a\n%a\n%!" Location.print loc Pprintast.expression e; + Stdlib.Format.printf "%a\n%a\n%!" Location.print loc Pprintast.expression e; assert false*) end ;; diff --git a/ppx/myhelpers.ml b/ppx/myhelpers.ml index e089dc970..919cece9d 100644 --- a/ppx/myhelpers.ml +++ b/ppx/myhelpers.ml @@ -20,7 +20,8 @@ let extract_names = List.map ~f:(fun (typ, _) -> match typ.ptyp_desc with | Ptyp_var s -> s - | _ -> failwith (Caml.Format.asprintf "Don't know what to do with %a" Pprintast.core_type typ)) + | _ -> + failwith (Stdlib.Format.asprintf "Don't know what to do with %a" Pprintast.core_type typ)) ;; open Ppxlib.Ast_builder.Default @@ -31,7 +32,7 @@ module Located = struct (* let mknoloc txt = { txt; loc = Location.none } *) let map_loc ~f l = { l with txt = f l.txt } - let sprintf ~loc fmt = Caml.Format.kasprintf (mk ~loc) fmt + let sprintf ~loc fmt = Stdlib.Format.kasprintf (mk ~loc) fmt end module Exp = struct diff --git a/ppx/reify/reify_impl.ml b/ppx/reify/reify_impl.ml index 926c2f6d0..aad843590 100644 --- a/ppx/reify/reify_impl.ml +++ b/ppx/reify/reify_impl.ml @@ -20,7 +20,7 @@ open Ppxlib open Stdppx open Ppxlib.Ast_builder.Default -module Format = Caml.Format +module Format = Stdlib.Format open Myhelpers type naming = @@ -413,7 +413,7 @@ let make_reifier_composition ~pat ?(typ = None) kind tdecl = let helper = reifier_of_core_type kind in let manifest = match tdecl.ptype_manifest with - | None -> failwiths "A type without manifest %s %d" Caml.__FILE__ Caml.__LINE__ + | None -> failwiths "A type without manifest %s %d" Stdlib.__FILE__ Stdlib.__LINE__ | Some m -> m in let body = @@ -427,7 +427,8 @@ let make_reifier_composition ~pat ?(typ = None) kind tdecl = (Exp.ident ~loc @@ lident_of_list [ "OCanren"; "Std"; "Pair"; reifier_name ]) [ helper ~loc l; helper ~loc r ] | Ptyp_tuple _ -> helper ~loc manifest - | _ -> failwiths ~loc "This type is not expected as manifest %s %d" Caml.__FILE__ Caml.__LINE__ + | _ -> + failwiths ~loc "This type is not expected as manifest %s %d" Stdlib.__FILE__ Stdlib.__LINE__ in let loc = tdecl.ptype_loc in let pat =