[haskell-llvm] Generating llvm ir code using the low level bindings

José Romildo Malaquias j.romildo at gmail.com
Fri Nov 23 12:30:12 GMT 2012


Hello.

I want to use the low level LLVM bindings to Haskell to write a toy
compiler. (In this compiler the types of expressions are known only when
the compiler is run. This makes it too difficult to use the high level
LLVM bindings. According to a prior message in this list, GADTs would be
needed to track the type of expressions.)

Currently it seems that I do not know how to insert code in the middle
of a llvm function body.

In order to test it I have written a small program, which is
attached. The generated code should have a call to the printint function
in the main function, but it is not being inserted there.

What am I missing?

Romildo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testllvm.hs
Type: text/x-haskell
Size: 1351 bytes
Desc: not available
URL: <http://projects.haskell.org/pipermail/haskell-llvm/attachments/20121123/e0133286/attachment.hs>


More information about the Haskell-llvm mailing list