[jhc] Loops.

Samuel Bronson naesten at gmail.com
Thu Mar 20 13:51:20 EDT 2008


On 3/20/08, John Meacham <john at repetae.net> wrote:

> x :: (a::*) -> a
> x a = x a
>
> in core, so it is not recognized as a loop. I doubt it will be much of a
> problem in practice, and eta reduction is an anti-optimization in
> general.

Why isn't that recognized as a loop? Isn't it typically beneficial in
the body of a function to replace calls like that with the return
value? For example:

fix :: (a -> a) -> a
fix f = f (fix f)


More information about the jhc mailing list