When I compile the follow code
main :: IO()
main = print ((iterate anyFunc 3)!!8)
is generated, in the core representation, a call to iterateFB1 instead of
iterate. Does this happen due to rule described below?
{-# RULES
"iterate"[~1] forall f x.iterate f x = build (\c _n -> iterateFB c
On 3/7/08, Guilherme Avelino <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I´m using the flag -fext-core to obtain the core of a program. But, rewrite
> rules not changed this code. Are there any way to observe the changes cause
> by rewrite rules on Core language?
>
> For sample:
>
> iterate :: (a -> a) -
gavelino:
>Hi,
>
>I'm using the flag -fext-core to obtain the core of a program. But,
>rewrite rules not changed this code. Are there any way to observe the
>changes cause by rewrite rules on Core language?
>
Yeah, -ddump-simpl-iterations -ddump-simpl-stats
will show each iterat
Hi,
I´m using the flag -fext-core to obtain the core of a program. But, rewrite
rules not changed this code. Are there any way to observe the changes cause
by rewrite rules on Core language?
For sample:
iterate :: (a -> a) -> a -> [a]
iterate f x = x : iterate f (f x)
iterateFB c f x = x `c` i