[haskell-llvm] Limitation of API - omissions or design?
uzytkownik2 at gmail.com
Thu Dec 16 17:46:36 EST 2010
On Thu, 2010-12-16 at 22:17 +0100, Henning Thielemann wrote:
> Maciej Piechotka wrote:
> > On Thu, 2010-12-16 at 14:23 +0100, Henning Thielemann wrote:
> >> On Thu, 16 Dec 2010, Maciej Piechotka wrote:
> >>> I use this technique often. Well the code is secure but I have things
> >>> like infinite space of values of infinite space of functions.
> >> What do you mean with 'space'? According to LLVM doc open arrays shall be
> >> implemented using arrays of size zero while relying on LLVM not to do any
> >> boundary checks.
> > I mean tree. Something like (simplified and for functions operating only
> > on ints):
> > data SymbolSpace a = SymbolSpace (a TypeNum) (SymbolSpace a TypeNum)
> I am wondering why SymbolSpace has one parameter 'a' on the left hand
> side, two arguments on the right side - 'a' and 'TypeNum'.
> I see, you need recursive types. They are handled in a special way in LLVM:
> I remember that they are not supported in Haskell-llvm wrapper and I
> helped myself with a void pointer that (in your case) I have to cast to
> a (Ptr SymbolSpace).
> It's an interesting challenge to model this in Haskell.
You misunderstood me. I have recursive types to handle the functions in
my codegen that other function may call. Or to keep space for integers,
array of integers, array of array of integers etc. - not type of linked
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
Url : http://projects.haskell.org/pipermail/haskell-llvm/attachments/20101216/5a253e39/attachment.pgp
More information about the Haskell-llvm