Adding a function in LLVM (haskell bindings) when the number of parameters is not known at compile time
问题 Background : I have written a toy Lisp interpreter that I am trying to add LLVM JIT functionality to. For the moment, have imposed the following limitations: Only integer values are allowed in functions Variables may only reference formal parameters Given : compile :: [Value] -- List of Formal Parameters -> [Value] -- Body of function -> CodeGenModule(Function a)` Question : How do I generate a function where the number of parameters equals the length of the Formal Parameters list? 回答1: I don