
23 Jul
2014
23 Jul
'14
4:06 a.m.
Am 23.07.2014 00:42, schrieb David Feuer:
I'm looking for some help writing some translate/untranslate rules to implement fusion for a couple of basic functions (the ones I'm looking at right now are takeWhile and scanr, but there may be others). I have a translation for takeWhile that seems to be at least decent, and one for scanr that is completely untested. I've never mucked about with GHC RULES, however, so I don't even know where to begin.
It is helpful to watch the simplifier working. E.g. -ddump-simpl-stats shows you the rules that fired and -ddump-simpl shows the Core outputs, that the simplifier phase produce.