-
-
Save Kakadu/f3c30f292edcfe7e3af78d88933b1303 to your computer and use it in GitHub Desktop.
demo with camlp5 rewriter for OCaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(env | |
(dev | |
(flags (:standard -rectypes -warn-error -A -w -33)) | |
)) | |
(library | |
(name lib1) | |
(modules lib1) | |
(preprocess (action | |
(run %{project_root}/rewriter.exe %{input-file}))) | |
(preprocessor_deps (file %{project_root}/rewriter.exe)) | |
) | |
(rule | |
(targets rewriter.exe) | |
(action | |
(run mkcamlp5.opt -package | |
camlp5,camlp5.pa_o %{deps} pr_dump.cmx | |
-o %{targets} -))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open List | |
open Option | |
let _ = map | |
let _ = List.fold_left |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment