[Haskell-cafe] Problem finding rewrite rules

Carter Schonwald carter.schonwald at gmail.com
Thu Aug 28 21:43:03 UTC 2014


GHC has certain rules builtin for simplifying expressions wrt various
primops


On Thu, Aug 28, 2014 at 4:40 PM, Dominik Peteler <haskell at with-h.at> wrote:

> Dear Cafe,
>
> I'm currently looking at the optimization GHC is doing and I cannot find
> the rewrite rules it fires. When I run my test code with
>
>     ghc -O2 -ddump-simpl-stats -ddump-rule-firings Main.hs
>
> GHC shows the rules which are fired:
>
>     ...
>     Rule fired: Class op +
>     ...
>     Rule fired: +##
>     ...
>
> and so on. Nothing new, nothing special.
> However, where do I find the definitions of these rules ?
> I grepped[1] the GHC code base and found nothing so far. I didn't find any
> documentation on it either.
>
> Can anyone point me to some place where I can find further information ?
>
> Thank you folks and have a nice day
>
> Dominik
>
> PS.: Since I'm working on numerical stable code with directed rounding
> I'm only interested in these two particular rules. I suspect them to
> break parts of my code.
>
> [1] http://jamie-wong.com/2013/07/12/grep-test
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140828/6f72a8a9/attachment.html>


More information about the Haskell-Cafe mailing list