This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,7 @@
(executable
(name identity_driver)
(libraries ppxlib))
(cram
(package ppxlib)
(deps identity_driver.exe))

View file

@ -0,0 +1 @@
let () = Ppxlib.Driver.standalone ()

View file

@ -0,0 +1,20 @@
The driver can read from stdin.
It works with sources...
$ ../identity_driver.exe -impl - << EOF
> let a = 1
> EOF
let a = 1
... but it should also work with binary ASTs.
We generate a binary AST file...
$ ../identity_driver.exe --dump-ast -o binary_ast -impl - << EOF
> let b = 2
> EOF
... and ensure the driver can also read it from stdin
$ cat binary_ast | ../identity_driver.exe -impl -
let b = 2