[haskell-llvm] patch: Vectors with Pos size, Arrays with Nat size

Henning Thielemann lemming at henning-thielemann.de
Sun Oct 10 11:07:18 EDT 2010


LLVM people say, that vectors never can have size zero. Thus I added Pos
constraint to all Vector operations. When adding these constraints, I
found missing Nat constraints for Array operations. When I inserted one
into the constraints of the GetElementPtr Array instance, HelloJIT did
no longer pass the type checker, because createString does not set the
array size. I added withString and withStringNul that reify the string
length.

These changes are contained in the attached patch set.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm-vector-array-size.darcs
Url: http://projects.haskell.org/pipermail/haskell-llvm/attachments/20101010/f7cc6584/attachment-0001.txt 


More information about the Haskell-llvm mailing list