Generate LLVM IR from Haskell code
问题 My goal is take source codes in different languages (mostly C, C++, Obj-C and Haskell) and tell every kind of statistics about them. (eg. number of variables, functions, memory allocations, complexity etc.) LLVM seemed to be a perfect tool for this, because I can generate the bitcode for these languages and with LLVM's customizable passes I can almost do anything. For the C family it works fine, take a C program ( test.c ) for example: #include <stdio.h> int main( ) { int num1, num2, sum;