Build the PPX executable with compiler-libs and make
This commit is contained in:
5 files changed
+48
No files matched your search
@@ -0,0 +1,4 @@
|
||||
continuum_ppx
|
||||
test.byte
|
||||
*.cmi
|
||||
*.cmo
|
||||
@@ -0,0 +1,15 @@
|
||||
OCAMLC ?= ocamlc
|
||||
|
||||
.PHONY: all test clean
|
||||
all: continuum_ppx
|
||||
|
||||
continuum_ppx: continuum_ppx.ml
|
||||
$(OCAMLC) -I +compiler-libs ocamlcommon.cma $< -o $@
|
||||
|
||||
test: continuum_ppx
|
||||
$(OCAMLC) -ppx ./continuum_ppx test.ml -o test.byte
|
||||
./test.byte
|
||||
OCAMLC=$(OCAMLC) sh test_errors.sh
|
||||
|
||||
clean:
|
||||
rm -f continuum_ppx test.byte *.cmi *.cmo
|
||||
@@ -0,0 +1,19 @@
|
||||
# continuum_ppx
|
||||
|
||||
An OCaml syntax rewriter for callback-based functions:
|
||||
|
||||
```ocaml
|
||||
let%continue x = producer in body
|
||||
```
|
||||
|
||||
expands to `producer (fun x -> body)`. The `let%cps` spelling also
|
||||
works. Patterns and nested bindings are supported. Recursive bindings and
|
||||
simultaneous `and` bindings produce a compiler error.
|
||||
|
||||
Build and test with `make test`. Compile a consumer with
|
||||
`ocamlc -ppx ./continuum_ppx example.ml`. The executable uses OCaml's bundled
|
||||
compiler libraries and must match the consumer's compiler version.
|
||||
|
||||
Install from this directory with `OPAMBUILDTEST=true opam pin add continuum_ppx .`.
|
||||
The package installs the `continuum_ppx` executable; it needs no external OCaml
|
||||
libraries or build tools beyond make.
|
||||
@@ -0,0 +1 @@
|
||||
bin: ["continuum_ppx"]
|
||||
@@ -0,0 +1,9 @@
|
||||
opam-version: "1.2"
|
||||
name: "continuum_ppx"
|
||||
version: "0.1.0"
|
||||
maintainer: "Local project maintainer"
|
||||
authors: ["continuum_ppx contributors"]
|
||||
homepage: "https://github.com/iitalics/ppx_cps/tree/e293af4"
|
||||
build: [make]
|
||||
build-test: [make "test"]
|
||||
available: [ocaml-version = "4.06.1"]
|
||||
Reference in new issue
Block a user