invalid C being produced
I'll try to narrow it down a bit more, but there's a lot happening here so it might take a while. anyway: here fromRuby is a haskell function, rb_ary_entry and rb_ary_len are imported C functions. This is in the context of a case expression. RT_ARRAY -> T_ARRAY $ unsafePerformIO $ mapM (liftM fromRuby . rb_ary_entry v) [0..(rb_ary_len v) - 1] producing the C fragment v232742406 = ((struct sCJhc__Prim___x3a*)v100508)->a2; /* ERROR: BaseOp {expBaseOp = Promote, expArgs = [nd505286687]} */ wptr_t v100510 = /* ERROR: nothing */; v34 = ((struct sP2_uFE_a__CCall__mysum_uexternal_d3*)v100510)->a1; v188768016 = fFE_a__CCall__mysum_uexternal_d3(v34,v59909010); which understandably fails to compile. Any ideas? mark
Hmmm.. That means promote is being called on something of the wrong
type. Try compiling with -flint to have it do a full typecheck
between each pass.
On Sep 6, 2009, at 6:51 PM, Mark Wotton
I'll try to narrow it down a bit more, but there's a lot happening here so it might take a while. anyway:
here fromRuby is a haskell function, rb_ary_entry and rb_ary_len are imported C functions. This is in the context of a case expression.
RT_ARRAY -> T_ARRAY $ unsafePerformIO $ mapM (liftM fromRuby . rb_ary_entry v) [0..(rb_ary_len v) - 1]
producing the C fragment
v232742406 = ((struct sCJhc__Prim___x3a*)v100508)->a2; /* ERROR: BaseOp {expBaseOp = Promote, expArgs = [nd505286687]} */ wptr_t v100510 = /* ERROR: nothing */; v34 = ((struct sP2_uFE_a__CCall__mysum_uexternal_d3*) v100510)->a1; v188768016 = fFE_a__CCall__mysum_uexternal_d3 (v34,v59909010);
which understandably fails to compile. Any ideas?
mark -- jhc mailing list jhc@haskell.org http://www.haskell.org/mailman/listinfo/jhc
participants (2)
-
John Meacham -
Mark Wotton