Rewrite rules in Core
Guilherme Avelino
gavelino at gmail.com
Fri Mar 7 16:08:28 EST 2008
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` iterateFB c f (f x)
{-# RULES
"iterate" [~1] forall f x. iterate f x = build (\c _n -> iterateFB c f
x)
"iterateFB" [1] iterateFB (:) = iterate
#-}
generates the same core representation with or without the rules.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/cvs-ghc/attachments/20080307/8823d7fe/attachment.htm
More information about the Cvs-ghc
mailing list