Inspired by the successes of program generation, partial evaluation, and runtime code generation, multi-stage languages were developed as a uniform, high-level, and principled view of staging. Our current goal is to demonstrate the utility of these languages in a practical implementation. As a rst step this paper presents MetaOCaml, a type-safe, multi-stage language, built as an extension to OCaml's bytecode compiler. Future-stage computations are represented as source programs. This makes it...