Import `compiler / ast.nim`, produce an AST, use `renderer.nim` to produce source code or use the rest of Nim's compilation pipeline.
But please don't invent yet another FP language. We have enough of these already and they are all pretty bad. Recursions easily introduce performance problems and tail recursions with lots of accumulator parameters is procedural programming in denial. And monads don't compose well. ;-) And if you don't agree, that's fine, just use Haskell already instead of wasting a tremendous amount of time into designing and implementing a "more sophisticated Elm".