Skip to content

Commit

Permalink
Turn interpreter into a Dune package
Browse files Browse the repository at this point in the history
  • Loading branch information
vapourismo committed May 5, 2022
1 parent c4699b1 commit 7dffd26
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
12 changes: 0 additions & 12 deletions interpreter/.merlin

This file was deleted.

33 changes: 33 additions & 0 deletions interpreter/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(include_subdirs unqualified)

(library
(name wasm)
; The 'main' module shall not be part of the library, as it would start the
; WASM REPL every time in all the dependencies.
; We also need to exclude the 'wasm' module as it overlaps with the library
; name.
(modules :standard \ main wasm))

(executable
(name main)
(modules main)
(libraries wasm)
(flags
(-open Wasm)))

(subdir
text
(rule
(target lexer.ml)
(deps lexer.mll)
(action
(chdir
%{workspace_root}
(run %{bin:ocamllex} -ml -q -o %{target} %{deps}))))
(ocamlyacc
(modules parser)))

(env
(dev
(flags
(-w +a-4-27-42-44-45 -warn-error +a-3))))
1 change: 1 addition & 0 deletions interpreter/dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(lang dune 2.9)

0 comments on commit 7dffd26

Please sign in to comment.