title: Compiler framework written in C++ for higher-order, dynamic, functional languages
body: <p>There are many compiler frameworks out there that can aid in implementing the backend for a language (eg. LLVM). However, there seems to be a dearth of "middle-ends" that are written in C++, and that can represent higher-order, dynamic, functional languages. The framework should do generic things like lambda lifting, closure conversion, type inferencing, etc. and help in other language specific transformations like, say, translating type classes, etc. Some candidates I can think of are <a href="http://codespeak.net/pypy/dist/pypy/doc/" rel="nofollow">PyPy</a> and <a href="http://wiki.clean.cs.ru.nl/Clean" rel="nofollow">Clean</a>. These are compilers for higher order, dynamic, functional languages. Arguably, one can connect the frontend for any language to these, and re-use the data structures and transformation available in them for doing the middle-end work. However, they are implemented in Python and Clean, respectively. Are there frameworks implemented in C++ for the above purpose?</p>