Hello GHC,

Tuesday, August 29, 2006, 10:54:07 PM, you wrote:

>  It makes sense to me that the above behaviour is seen: length is now a
>  good
>  consumer, but it generates 1+(1+(1+(1+... as it is consuming, and this
>  causes a stack overflow. I don't think we can fix this while staying with
>  fold/build fusion, so it looks to me like the patch should be reverted and
>  the whole problem looked at post-6.6.


in general, for any function we can either implement
1) good consumer based on using foldr
2) tail-recursion

are you agree?

in particular, filterM, replicateM and other *M list operations (their
problems was mentioned earlier) can be implemented in first or second
way, but not both

may be this can be fixed with some smart rules, which selects first or
second implementation depending on context?



-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]

_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to