[jhc] invalid C being produced

Mark Wotton mwotton at gmail.com
Sun Sep 6 21:51:29 EDT 2009


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


More information about the jhc mailing list