[haskell-llvm] [Haskell-cafe] LLVM, type-level?
lally.singh at gmail.com
Wed Dec 8 09:17:26 EST 2010
On Tue, Dec 7, 2010 at 1:31 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> On Tue, 7 Dec 2010, Lally Singh wrote:
>> Hey all,
>> I'm generating a structure definition from input, and would like to
>> generate some LLVM code that can use it. I see an 'alloca' function
>> in LLVM.Core that may do the trick, but takes a static type (Ptr a),
>> which I wouldn't have. Is there a dynamic variant? I'm currently
>> generating a TypeDesc Struct type.
> How much flexibility do you need? Is the user really allowed to specify an
> arbitrary 'struct' declaration? This could be a security hole.
> If you really want it, I think you would have to use existential
> quantification in order to construct a user defined type at runtime.
Could you elaborate on this a bit more? Or is there an example
somewhere I could look at?
More information about the Haskell-llvm