Add OCaml code generation #24

Merged
glen merged 8 commits from ocaml_gen into main 2021-03-01 20:40:35 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit d1c3ed3481 - Show all commits

View File

@ -30,7 +30,7 @@ steps:
- mkdir -p lib - mkdir -p lib
- curl -o lib/sunshine.jar -L 'http://artifacts.metaborg.org/service/local/artifact/maven/redirect?r=snapshots&g=org.metaborg&a=org.metaborg.sunshine2&v=LATEST' - curl -o lib/sunshine.jar -L 'http://artifacts.metaborg.org/service/local/artifact/maven/redirect?r=snapshots&g=org.metaborg&a=org.metaborg.sunshine2&v=LATEST'
- name: setup_gen - name: setup_gen
image: maven image: silkeh/clang
volumes: volumes:
- name: m2 - name: m2
path: /root/.m2 path: /root/.m2

View File

@ -59,8 +59,8 @@ For example, this snippet generates the following Python:
It generates nearly identical code in It generates nearly identical code in
this simple example for Javascript (just with `"Hello, world!"` this simple example for Javascript (just with `"Hello, world!"`
in place of `r'Hello, world!'`), although it generates a different in place of `r'Hello, world!'`), although it generates a different
preamble defining Stdio for each language. (Currently, Haskell code preamble defining Stdio for each language. (Currently, Haskell and OCaml
generation is also supported.) code generation are also supported.)
There's not much to break down in such a tiny program as this, but let's do There's not much to break down in such a tiny program as this, but let's do
it. The prefix operator `<<<` could be read as "the default stream receives...", it. The prefix operator `<<<` could be read as "the default stream receives...",