Hmm on second thoughts, it's probably best to expose a nix-repl... it would be much more powerful. Thanks for than Vladimir! The user interface (ie compile button, whatever) could just write strings directly into the repl then linefeed, or you could just type it yourself. This would simplify things quite a lot actually.