From aa3f4b47841e752292e4961cc742511035822ae4 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 10 Nov 2022 11:36:30 +0100 Subject: [PATCH] be jscoq friendly --- src/coq_elpi_vernacular.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/coq_elpi_vernacular.ml b/src/coq_elpi_vernacular.ml index 25a5200aa..6c7c8abfa 100644 --- a/src/coq_elpi_vernacular.ml +++ b/src/coq_elpi_vernacular.ml @@ -223,8 +223,11 @@ let file_resolver = let build_dir = Coq_elpi_config.elpi_dir in let installed_dirs = let valid_dir d = try Sys.is_directory d with Sys_error _ -> false in - let env = Boot.Env.init () in - let user_contrib = Boot.Env.(user_contrib env |> Path.to_string) in + let user_contrib = + if Sys.backend_type = Sys.Other "js_of_ocaml" then "../.." + else + let env = Boot.Env.init () in + Boot.Env.(user_contrib env |> Path.to_string) in user_contrib :: Envars.coqpath |> List.map (fun p -> p ^ "/elpi/") |> ((@) [".";".."]) (* Hem, this sucks *)