Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Arc Lisp to C compiler
Arc C
Fetching latest commit...
Cannot retrieve the latest commit at this time.


    .-.   --\  /    arc2c
   /   \  --/  \_

This is the Arc to C compiler.

Arc is the new Lisp from Paul Graham ( It's official release is currently implemented as an interpreter above mzscheme.

Here, we are trying to make a compiler translating Arc code to C code, written in Arc. The goal is to see if (and how) a dynamically typed language conceived for exploratory programing and protoyping can be compiled efficiently. The current implementation is based on a tutorial proposed by Marc Feeley : The 90 Minute Scheme to C compiler (

Currently, the compiler implements numerical operations on fixnums (+, -, *, <, >, <=, >=, is, isnt), comparison on symbols (is, isnt), comparison on characters (is, isnt), comparison and modification on strings (is, isnt, sref), annotations (type, rep, annotate) and cons cells construction, deconstruction and comparison (cons, car, cdr, is, isnt). All values can be printed with pr or prn. Unicode is supposed to be fully supported. The language supports first class continuations (with ccc) and is tail-recursive/tail-call-optimizing. Memory is managed via a home-made GC.

The let, set, sref, and fn syntaxes are partially implemented.  quote and if syntax are fully implemented. Symbols, numbers, and cons cells of symbols, numbers and cons cells can be quoted. Primitive operations cannot be overriden. If you call an undefined global function, the compiled program will silently crash (many but NOT all such errors are caught by the compiler). Some primitive operations expect certain type guarantees and do not check for correct types. There are probably bugs in every part of the program...

Use freely, at your own risk. If you want to improve the tool with us, send mail to

To use the compiler, in arc :

(load "arc2c.arc")
(compile-file "foo.arc")

Notes about the compiler's output code is available in the NOTES file.

Something went wrong with that request. Please try again.