> Build a new language that uses Nim as a back end, using the functional code > from a language such as Elm to emit Nim code that would be converted to c/C++ > by Nim.
As macros are part of Nim language definition, so is Nim AST definition. If it were possible to plug into Nim compiler to provide an AST created with a functional language, you could have best of both worlds. A functional syntax after writing a parser for a new FP language, and efficiency of Nim binary generation (and of course stdlib and environment).