Skip to content

Commit

Permalink
playground: open melange_comp_libs in flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri committed Jun 5, 2023
1 parent c4ad80d commit 1620cbc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -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))
9 changes: 3 additions & 6 deletions bin/jsoo_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 =
Expand Down
3 changes: 1 addition & 2 deletions bin/jsoo_main.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1620cbc

Please sign in to comment.