[CakeML-dev] Bootstrapped compiler preview
Ramana.Kumar at cl.cam.ac.uk
Sat Mar 4 23:12:22 UTC 2017
Hi CakeML developers,
I've put the result you could obtain by running the compiler bootstrap
on a recent commit (389d340f) online here:
https://cakeml.org/cake-389d340f.S.tar.gz, so you can try it without
having to build it if you want.
This version contains basis library modules including FileIO (actually
only read-only) and CharIO, whose contents you can glean by looking at
basis/mlfileioProgScript.sml and basis/mlcharioProgScript.sml etc.
Here's an example of how to use it. You need the basis_ffi.c file
available from basis/basis_ffi.c in the repo (preferably the one at
commit 389d340f, but I think it hasn't changed on master since then).
$ tar -xvzf cake-389d340f.S.tar.gz
$ gcc -o cake basis_ffi.c cake-389d340f.S
# Example: a CakeML program that prints the first char in the .S file
$ ./cake > result.S
val f = FileIO.openIn("cake-389d340f.S");
val SOME c = FileIO.fgetc f;
$ gcc -o result basis_ffi.c result.S
# prints '#'
More information about the Developers