Evil ML: ML to C++ template language

Evil ML is a joke compiler from ML to C++ template language (not ordinary C++ code). Please, don't use this for practical purposes.

C++ template is a higher-order pure functional programming language traditionally used for compile-time computation, while its syntax is verbose and hard to use. ML, a higher-order functional programming language, is simple, practical and easy to understand, so that we jokingly implemented this compiler. You can easily use black magic in C++ template programming. This will give you nightmares.

See https://github.com/akabe/evilml for details.


Input: OCaml code

Type Inference Result

Output: C++ code