[haskell-llvm] [Haskell-cafe] LLVM, type-level?

Lally Singh lally.singh at gmail.com
Tue Dec 7 17:27:50 EST 2010


On Tue, Dec 7, 2010 at 2:20 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> On Tue, 7 Dec 2010, Lally Singh wrote:
>
>> I'd like to get the runtime arguments of a function.  In my case,
>> main()'s command-line arguments to get the shared-memory ID.
>
> Do you mean System.Environment.getArgs ?

Ah, I see the confusion.  I'm not generating the llvm code to run
within the haskell process.  It'll be written as bitcode to disk, and
run with lli as a separate process, with its own set of command-line
arguments.

Here, I'll give the details.

I'm writing a haskell program that takes in a text file describing a
structure.  It will generate an llvm bytecode'd program defining
main(), that will read its first argument to be a shared memory
handle, attach that handle to its own address space, and read one of
those structures out of it, dumping it to the console via printf().

So, I need to figure out how to read the arguments passed to my
llvm-generated main.



More information about the Haskell-llvm mailing list