Skip to content

Commit

Permalink
dune: improve interaction with merlin
Browse files Browse the repository at this point in the history
  • Loading branch information
gares committed Nov 2, 2021
1 parent fbc7334 commit 9d23826
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/API.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let r = ref (module Runtime_trace_off : Runtime)

let set_runtime b =
begin match b with
| true -> r := (module Runtime_trace_on : Runtime)
| true -> r := (module Runtime : Runtime)
| false -> r := (module Runtime_trace_off : Runtime)
end;
let module R = (val !r) in
Expand Down
10 changes: 4 additions & 6 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
(public_name elpi)
(preprocess (per_module
((pps ppx_deriving.std) API ast data compiler)
((pps ppx_deriving.std elpi.trace.ppx -- --cookie "elpi_trace=\"true\"") runtime_trace_on)
((pps ppx_deriving.std elpi.trace.ppx -- --cookie "elpi_trace=\"true\"") runtime)
((pps ppx_deriving.std elpi.trace.ppx -- --cookie "elpi_trace=\"false\"") runtime_trace_off)
((action (run camlp5o -I . -I +camlp5 pa_extend.cmo pa_lexer.cmo %{input-file})) parser)
))
(libraries re.str camlp5.gramlib unix) ; elpi.trace.runtime ppx_deriving.runtime)
(libraries re.str camlp5.gramlib unix)
(flags -linkall)
(modules elpi util parser ast compiler data ptmap builtin builtin_checker builtin_stdlib builtin_map builtin_set API runtime_trace_on runtime_trace_off)
(private_modules util parser ast compiler data ptmap builtin_stdlib builtin_map builtin_set runtime_trace_on runtime_trace_off)
(modules elpi util parser ast compiler data ptmap builtin builtin_checker builtin_stdlib builtin_map builtin_set API runtime_trace_off runtime)
(private_modules util parser ast compiler data ptmap builtin_stdlib builtin_map builtin_set runtime runtime_trace_off)
)

(dirs .ppcache)

(rule (with-stdout-to builtin_stdlib.ml (progn
(echo "let code = {code|#line 0 \"builtin_stdlib.elpi\"\n")
(cat builtin_stdlib.elpi)
Expand Down
1 change: 0 additions & 1 deletion src/runtime_trace_on.ml

This file was deleted.

1 change: 0 additions & 1 deletion src/runtime_trace_on.mli

This file was deleted.

0 comments on commit 9d23826

Please sign in to comment.