Commit fd30dbf9 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Remove leftover renamed file.

parent 420e2189
(* Compatibilty for OCaml 4.11 & 4.12 *)
open Cduce_core
let longident_parse s =
let open Ocaml_common in
match String.index_opt s '.' with
| None -> Longident.Lident s
| _ -> Parse.longident (Lexing.from_string s)
module Mlstub = struct
let noloc id = Some id
let str_open l =
let open Ocaml_common.Ast_helper in
Str.open_ (Opn.mk (Mod.ident l))
end
module Mltypes = struct
open Ocaml_common
let get_path_from_mty_alias = function
| Types.Mty_alias p -> p
| _ -> assert false
let lookup_value li env = Env.find_value_by_name li env
let lookup_module li env =
let loc =
Warnings.
{
loc_start = Lexing.dummy_pos;
loc_end = Lexing.dummy_pos;
loc_ghost = true;
}
in
Env.lookup_module_path ~use:true ~load:true ~loc li env
let is_mty_alias = function Types.Mty_alias _ -> true | _ -> false
let mty_get_path = function Types.Mty_alias p -> p | _ -> assert false
let load_path =
let once = ref false in
function
| () ->
if !once then ()
else begin
once := true;
List.iter Load_path.add_dir (List.rev !Cduce_loc.obj_path);
Load_path.add_dir Config.standard_library
end
let find_in_path file = Misc.find_in_path_uncap (Load_path.get_paths ()) file
let get_path_from_pdot e =
match e with Path.Pdot (p, _) -> p | _ -> assert false
let is_sig_value_val_reg e =
match e with
| Types.Sig_value (_, { val_type = _; val_kind = Val_reg; _ }, _) -> true
| _ -> false
let get_id_t_from_sig_value e =
match e with
| Types.Sig_value (id, { val_type = t; _ }, _) -> (id, t)
| _ -> assert false
let get_sig_type e =
match e with
| Types.Sig_type (id, t, rs, _) -> (id, t, rs)
| _ -> assert false
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment