From 1620cbc9024e36c83775c7f4ba2dc7461d2fddf4 Mon Sep 17 00:00:00 2001 From: Javier Chavarri Date: Mon, 5 Jun 2023 13:13:18 +0000 Subject: [PATCH] playground: open melange_comp_libs in flags --- bin/dune | 1 + bin/jsoo_main.ml | 9 +++------ bin/jsoo_main.mli | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/dune b/bin/dune index da842808a..0be1f1185 100644 --- a/bin/dune +++ b/bin/dune @@ -16,6 +16,7 @@ (executable (name jsoo_main) + (flags :standard -open Melange_compiler_libs) (modules jsoo_main jsoo_common) (libraries core melange_compiler_libs melange_ppx) (modes js)) diff --git a/bin/jsoo_main.ml b/bin/jsoo_main.ml index 20f0a7f94..7a99f2d73 100644 --- a/bin/jsoo_main.ml +++ b/bin/jsoo_main.ml @@ -23,9 +23,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) module Js = Jsoo_common.Js -open Melange_compiler_libs - -(** *) (* Error: @@ -64,14 +61,14 @@ let compile impl str : Js.Unsafe.obj = try (* default *) let ast = impl (Lexing.from_string str) in - let ast : Melange_compiler_libs.Parsetree.structure = + let ast : Parsetree.structure = let ppxlib_ast : Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.structure = - Obj.magic (ast : Melange_compiler_libs.Parsetree.structure) + Obj.magic (ast : Parsetree.structure) in let converted = Convert.copy_structure (Ppxlib.Driver.map_structure ppxlib_ast) in - (Obj.magic converted : Melange_compiler_libs.Parsetree.structure) + (Obj.magic converted : Parsetree.structure) in let typed_tree = let { Typedtree.structure; coercion; shape = _; signature }, _finalenv = diff --git a/bin/jsoo_main.mli b/bin/jsoo_main.mli index 443650cf1..a5f1becd5 100644 --- a/bin/jsoo_main.mli +++ b/bin/jsoo_main.mli @@ -22,5 +22,4 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -val make_compiler : - string -> (Lexing.lexbuf -> Melange_compiler_libs.Parsetree.structure) -> unit +val make_compiler : string -> (Lexing.lexbuf -> Parsetree.structure) -> unit