"Simon Marlow" <[EMAIL PROTECTED]> wrote: > > I thought yhc supported unboxed values, so a loop like > > > > count 0 = 0 > > count n = count (n - 1) > > > > count 100000 > > > > could block the runtime (assuming it was properly unboxed by the > > compiler) since it never calls back into it and is just a straight > > up countdown loop? > > are we talking about the same compiler? YHC is fully interpreted, has > no unboxed types, and AFAIK it is impossible to write any code that > doesn't get preempted after a while.
Indeed. But unboxing is not the issue - the main reason is that yhc cannot currently compile that code into a loop - jumps only go forwards in the bytecode, never backwards. The only possible bytecode representation of a loop is as a recursive call, which immediately presents an opportunity to insert a yield. Regards, Malcolm _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime